home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / hdtst495.zip / HDTEST.DOC < prev    next >
Text File  |  1990-03-10  |  137KB  |  2,429 lines

  1.           
  2.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  3.           
  4.           
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                           HDTEST - Hard Disk Test/Repair Utility                          ______________________________________
  14.  
  15.                            Copyright (1984-1990), P. R. Fletcher                           _____________________________________
  16.                                     All Rights Reserved                                    ___________________
  17.  
  18.  
  19.  
  20.                         Distributed by:
  21.  
  22.                                P. R. Fletcher (Software)
  23.                                1515 West Montgomery Avenue
  24.                                Rosemont
  25.                                PA 19010
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                                   _______
  32.                              ____|__     |               (tm)
  33.                           --|       |    |-------------------
  34.                             |   ____|__  |  Association of
  35.                             |  |       |_|  Shareware
  36.                             |__|   o   |    Professionals
  37.                           -----|   |   |---------------------
  38.                                |___|___|    MEMBER
  39.  
  40.            
  41.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  42.           
  43.           
  44.                                      TABLE OF CONTENTS                                     _________________
  45.  
  46.  
  47.           User-Supported Software                                    1
  48.           Introduction                                               2
  49.           Getting Started - Installation                             5
  50.                           - Testing a Disk                           5
  51.           Hardware and Software Requirements                         7
  52.           Limitations and Restrictions                               9
  53.           Command Line Options - HDCHEK                             10
  54.                                - HDTEST                             12
  55.           What does HDTEST do?                                      15
  56.           Using the Special Pre-Boot                                16
  57.           Dealing with Bad Clusters                                 18
  58.           Running HDTEST from a .BAT file                           19
  59.           Bugs and Other Unpleasant Subjects                        20
  60.           Changes from Previous Versions                            21
  61.           Appendix A - Summary of Flag Settings                     25
  62.           Appendix B - Disk Error Messages                          27
  63.           Appendix C - Example Program Runs                         34
  64.           Registration Form                                         37
  65.            
  66.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  67.           
  68.           
  69.                                   USER-SUPPORTED SOFTWARE                                  _______________________
  70.  
  71.           Much of the software which is available for your computer has, in the
  72.           past, been produced and sold on the assumption that you are a crook
  73.           and that you will take any available opportunity to cheat software
  74.           writers and vendors out of their rightful reward. Such software was
  75.           copy-protected within an inch of its (and your computer's) life and
  76.           was priced at a level which still guaranteed its producers a profit
  77.           even if four or five illegal copies were made for each one sold.
  78.           Thankfully, prices of commercial software have (for the most part)
  79.           come down somewhat, and copy-protection is becoming much less
  80.           prevalent, but buying such software remains something of a lottery -
  81.           you often cannot be sure that the software does what you want in the
  82.           way you want it done until you have paid for it. User-supported
  83.           software (Shareware) is different. You may have got a copy of this
  84.           package free from a friend or a bulletin board or (for a nominal fee)
  85.           from a users' group or software library. In any case, you have a
  86.           perfectly legal working copy of the HDTEST package. You are encouraged
  87.           to make as many copies of the package as you like and to distribute
  88.           them to all your friends. If, after trying the program out, you find
  89.           that it is useful and want to continue to keep and use it, you must
  90.           register your copy by sending the registration fee ($35.00, unless you
  91.           are already a registered user of DIREDIT, in which case it is $25.00)
  92.           together with the completed registration form, to the address on the
  93.           form. Only your conscience can make you do this (although you are                                         ____                              
  94.           probably breaking the law if you don't), but bear in mind that the
  95.           distributors of "user-supported" software are making the assumption
  96.           that you are honest and willing to pay a reasonable price for a useful
  97.           program, many commercial software vendors, on the other hand, would
  98.           still apparently rather believe you are a crook. You can decide who
  99.           you would rather prove right. Registered users are entitled to
  100.           support, upgrades, and help with HDTEST-related problems (including
  101.           telephone support) for a year from the date of registration.
  102.  
  103.           The author of this program is a member of the Association of Shareware
  104.           Professionals (ASP).  ASP wants to make sure that the shareware
  105.           principle works for you. If you are unable to resolve a shareware-
  106.           related problem with an ASP member by contacting the member directly,
  107.           ASP may be able to help. The ASP Ombudsman can help you resolve a
  108.           dispute or problem with an ASP member, but does not provide technical
  109.           support for members' products. Please write to the ASP Ombudsman at
  110.           P.O. Box 5786, Bellevue, WA 98006 or send a Compuserve message via
  111.           Easyplex to ASP Ombudsman 70007,3536"
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.           
  127.           
  128.                                           Page 1 
  129.            
  130.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  131.           
  132.           
  133.                                        INTRODUCTION                                       ____________
  134.  
  135.           HDTEST was originally written to allow comprehensive Read/Write
  136.           testing of hard disks on IBM PCs, XTs, ATs, and "true" compatibles.
  137.           The V4.10 release removed many of the hardware restrictions imposed by
  138.           earlier (V2.xx and V3.xx) versions of the program and made it useful
  139.           for testing most MS-DOS-compatible storage devices currently in use on
  140.           IBM-compatible computers, including removable (floppy and hard) disks
  141.           and logically partitioned hard disks. The V4.34 release included BIOS-
  142.           level support for DOS 3.3 (and above) "extended devices" and more
  143.           options for the handling of totally unreadable sectors. The V4.53
  144.           release added even more extensive support for IBM-incompatible
  145.           hardware and removed the requirement that ANSI.SYS be loaded to
  146.           support a proper screen display. The current release adds full support
  147.           for the large (> 32Mb) devices allowed by DOS 4.0, the ability to
  148.           locate bad spots physically (by track, head, and sector) on the disk,
  149.           and some support for the use of .BAT files to run HDTEST on multiple
  150.           disks at one "sitting".
  151.  
  152.           Although many programs, including IBM's diagnostics, allow "surface
  153.           scanning" and seek testing of hard disks, few that are available to
  154.           the average user test whether the whole disk can retain the data that
  155.           is or will be written to it. HDTEST's principal "claim to fame" is the
  156.           ability thoroughly to test the magnetic media in a device which
  157.           contains data while preserving the data (although data loss is                        _________________________                       
  158.           unavoidable if an area which is in use has become unreadable). HDTEST                                                              ____             
  159.           tests the disk much more thoroughly than programs such as DFixer,
  160.           Mace, and Norton's DT. Mace and DT, like many public domain "disk
  161.           test" programs, simply read every cluster on the disk and report on
  162.           any errors encountered.  DFixer does better, writing 4 test patterns
  163.           to every free cluster and checking that they can be read back
  164.           correctly, but it makes no attempt to test clusters that are already
  165.           in use - the very ones which contain your precious data! Disk
  166.           Technician (TM), a product which has come to market fairly recently,
  167.           is more closely comparable to HDTEST than any other disk testing
  168.           program that I know about. It is, however, much more expensive, is
  169.           (functionally, at least) copy-protected, and is not available as                                                          ___             
  170.           Shareware!
  171.  
  172.           In addition to its testing function, HDTEST has been reported to be
  173.           useful as an automatic disk repair utility for both hard and floppy
  174.           disks which have developed (especially) intermittent or persistent
  175.           read errors, preventing or impeding their normal use. Although HDTEST
  176.           cannot read the totally unreadable, it tries much harder that DOS does
  177.           and will almost always, in the course of its operation, allow you to
  178.           recover the entire readable portion(s) of a file with one or more                             ________                                      
  179.           unreadable clusters in it, optionally either remapping all of what it
  180.           reads from the disk or replacing bad sectors (the default) or clusters
  181.           with NULLs. HDTEST is not an alternative to backing up your floppies                                ___                                           
  182.           and/or hard disk - it may sometimes be able to save your neck when you                                    _________                                   
  183.           forgot or your backup went bad too! On hard disks which have developed
  184.           intermittent read errors, running HDTEST can sometimes totally cure                                                   ___                       
  185.           the problem, presumably because the "flaky" sectors get rewritten and
  186.           the minor misalignments and/or weakening of the magnetic "image" which
  187.           were causing the trouble are corrected when the data is rewritten.
  188.  
  189.  
  190.           
  191.           
  192.                                           Page 2 
  193.            
  194.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  195.           
  196.           
  197.           In its default ("slow") mode, HDTEST writes 20 different test patterns
  198.           to every cluster on the disk and checks that each pattern can be read             _____                                                             
  199.           back correctly, while preserving (and eventually restoring) the
  200.           contents of the clusters that contain data.  HDTEST can even (on many
  201.           devices) detect hard disk errors which are minor enough to be
  202.           correctable (and corrected) by the disk controller's own "error-
  203.           correcting code" (ECC).  These errors are normally totally invisible
  204.           to programs running under DOS and will not usually be picked up by
  205.           other disk test utilities.  They may, however, be early signs of
  206.           problems that will become significant later, and HDTEST consequently
  207.           marks these clusters, too, as bad. As long as HDTEST can read the data
  208.           from a flaky cluster correctly once (and it tries quite hard) it will
  209.           be able to save the file of which that cluster is a part intact, while                                                                   ______       
  210.           marking the cluster so that DOS does not try to use it again. The
  211.           program was designed to minimize the likelihood of user error causing
  212.           data loss on a good (or slightly bad) disk, and to be as easy as
  213.           possible to use - it could not be made very fast, since multiple bit
  214.           patterns have to be written to and read from each cluster, and this
  215.           takes a significant time even on a fast hard disk. The program does,
  216.           however, have a less sensitive "fast" test mode, which writes only two
  217.           test patterns to each block and is recommended for use when
  218.           testing/repairing floppy disks and/or to correct intermittent problems
  219.           or rule out gross problems on a hard disk.
  220.  
  221.           The program can be used to test/repair single and double-sided 8- and
  222.           9-sector minifloppies (if you have plenty of patience!), as well as                                             ______                          
  223.           AT-format 1.2Mb minifloppies, 8" standard floppies, and 3.5"
  224.           microfloppies (with the same proviso regarding a need for patience).
  225.  
  226.           HDTEST's companion program, HDCHEK, simply examines the logical
  227.           structure of the system and target device and gives a short report on
  228.           what it finds. It does not write to the disk, and is provided                                 ___                                   
  229.           principally to allow a quick and easy, but fairly reliable, check on
  230.           the compatibility between HDTEST and a given software/hardware
  231.           configuration. As part of its report, HDCHEK notes at what level (DOS
  232.           interrupts only, INT 13, or direct entry to the BIOS) it was able to
  233.           access the target device, which has a bearing on HDTEST's ability to
  234.           detect certain types of errors. In general, if HDCHEK runs                                          __________                
  235.           successfully on a system and target device, then HDTEST can be
  236.           expected to do so, although the latter program requires much more
  237.           available memory.
  238.  
  239.           The HDTEST package is distributed as "User-supported Software". If you
  240.           intend to continue using the program, you are required to become a
  241.           Registered user. Send a completed copy of the Registration Form (which
  242.           is included in this documentation), together with a check or money
  243.           order for $35.00 (+ $5.00 for shipping outside the continent of North
  244.           America) to me at the address which appears on the form. Please also
  245.           add $2.50 (or equivalent) if you want the software on a 1.2 Mb HD
  246.           floppy or a 3.5" minifloppy, rather than a 360 Kb DSDD floppy, and
  247.           specify which you want on the Reg. form. Checks and money orders in
  248.           denominations other than U.S. dollars are acceptable, but please add a
  249.           further $10.00 for bank charges before using the current exchange rate
  250.           to calculate the fee in the currency in which you are paying. On
  251.           receiving your Registration, I will send you a personalized copy of
  252.           the latest, enhanced, version of the HDTEST package (currently V4.91),
  253.           and register you for a year's support. Registration entitles you to be
  254.           
  255.           
  256.                                           Page 3 
  257.            
  258.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  259.           
  260.           
  261.           notified of upgrades, bug fixes, newly discovered incompatibilities,
  262.           etc., and to ask for (and get) necessary help in adapting the program
  263.           to work on your hardware. I cannot guarantee to make HDTEST work with
  264.           every possible combination of hardware and software, but I will
  265.           promise to try to solve problems as they come up, and I will return
  266.           your Registration fee if I cannot support HDTEST on your system.
  267.           Support is available TO REGISTERED USERS ONLY by mail, BIXmail,                               ________________________                  
  268.           Compuserve EMail and telephone. Please also bear in mind that my
  269.           willingness and ability to continue to support and enhance these
  270.           programs will be directly dependent on users' willingness to pay the
  271.           Registration fee and (to some extent) inversely dependent on the
  272.           number of questions I get that could be answered by reading the docu-
  273.           mentation(!).
  274.  
  275.           The HD programs were written principally in C, compiled by the
  276.           Microsoft C compiler (Version 5.10) using its "small" memory model,
  277.           and linked with code from the distributed Microsoft C object libraries
  278.           using the Microsoft LINK program (Version 4.06). Portions of the
  279.           distributed program are consequently Copyright (C) by Microsoft Corp.,
  280.           1985 - 1988. All rights reserved. These portions are used under the
  281.           terms of a license from Microsoft Corp. Some low-level functions were
  282.           written in assembly language and assembled by the Microsoft MASM Macro
  283.           Assembler (Version 5.10).
  284.  
  285.           The HD programs were written with care and have been tested on a
  286.           number of different systems.  I cannot, however, give any guarantee as
  287.           to their performance on a specific system, nor can I accept liability
  288.           for any actual or consequential loss resulting from their use. The
  289.           programs may only be used and/or copied in their original form.
  290.           Unauthorized modifications and/or the use of all or part of the
  291.           programs in other software, commercial or otherwise, are strictly
  292.           prohibited.
  293.  
  294.           The HD programs owe a lot of their value to suggestions and bug
  295.           reports (more of the former than the latter, fortunately) from
  296.           Registered users. They were originally written in response to a
  297.           "challenge" issued by Roedy Green on Bix, and their further
  298.           development has also been significantly influenced by his input.
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.           
  319.           
  320.                                           Page 4 
  321.            
  322.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  323.           
  324.           
  325.  
  326.                               GETTING STARTED - INSTALLATION                              ______________________________
  327.  
  328.           1) If you received the HDTEST package on a disk, use the DOS DISKCOPY
  329.           program to make a duplicate of the distribution disk, put the original
  330.           away in a safe place, and use the duplicate as your working disk.
  331.           Otherwise, use COPY to save a copy of the HDTEST distributions files
  332.           to a floppy disk, and put it away.
  333.  
  334.           2) HDTEST does not require any special installation procedure. You may
  335.           run HDCHEK and HDTEST from your working floppy disk or from a
  336.           subdirectory on your hard disk. If you wish to keep and run the
  337.           programs on your hard disk, you will probably find it most convenient
  338.           to COPY them to a subdirectory which is one of those included in your
  339.           DOS PATH (see your DOS Reference Manual). Only the two main .EXE files
  340.           (HDTEST.EXE and HDCHEK.EXE) need normally be kept on-line.
  341.           BOOTLOAD.COM is only used or needed to create a special boot disk, if
  342.           you find you need to use one.
  343.  
  344.           3) If you wish to be able to refer to this documentation on-line, you
  345.           should follow the instructions in the README.1ST file on the
  346.           distribution disk to produce a .TXT file (without underlining) and
  347.           keep that file in your documentation subdirectory.
  348.  
  349.  
  350.                              GETTING STARTED - TESTING A DISK                             ________________________________
  351.  
  352.           This section gives step by step instructions for running HDCHEK and
  353.           HDTEST on the C: drive of a standard IBM PC, XT, AT, or 100%
  354.           compatible. Subsequent sections of this documentation go into much
  355.           more detail about some of the program's other features and options,
  356.           and should help to explain and let you deal with any problems which
  357.           you may encounter. Note that you should never attempt to run HDTEST                                                  _____                      
  358.           under a multi-tasking or multi-user operating system, nor activate any
  359.           "pop-up" program (e.g. SideKick) while the program is running.
  360.  
  361.           1) Make sure that you have current backups of all the files on drive
  362.           C:. This is particularly important when running the program for the
  363.           first time on a given system.
  364.  
  365.           2) Run DOS's CHKDSK program on drive C: and correct any errors
  366.           reported by it before proceeding further.
  367.  
  368.           3) Make the drive and/or directory which contains HDCHEK.EXE and
  369.           HDTEST.EXE your current drive and/or directory.
  370.  
  371.           4) If you are not running HDTEST from your A> drive, insert a
  372.           formatted, non-write-protected floppy disk in drive A. HDTEST will
  373.           write an ASCII log file called HDTESTC0.LOG to the disk in drive A -
  374.           any other files on it will be undisturbed.
  375.  
  376.           5) Give the command: "HDCHEK C:". After a certain amount of disk
  377.           activity has taken place, and certainly within a minute or two, your
  378.           screen should look like one of the examples given in Appendix C. If
  379.           any errors are reported, DO NOT PROCEED until you have read the rest                                   ______________                             
  380.           of the documentation and/or are sure you know what is going on.
  381.  
  382.           
  383.           
  384.                                           Page 5 
  385.            
  386.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  387.           
  388.           
  389.           6) If HDCHEK reported no errors, give the command "HDTEST C: A:".             ____________________________                                  
  390.           After some disk activity, the program will prompt for replies to three
  391.           questions - press <Return> in response to each prompt. The program
  392.           will report its progress to the screen and will record any problems
  393.           encountered in the log file on the floppy disk. Depending on the size
  394.           of your DOS partition and the access time of the disk, a complete run
  395.           of HDTEST (in its normal, "slow", mode) will take between 2 and 5
  396.           hours. Your intervention will only be required if a recovered bad          _____                                                            
  397.           cluster is found in a "hidden", "system", or write-protected file,
  398.           when you will be asked to approve remapping; otherwise, bad clusters
  399.           will be automatically remapped. HDTEST can be aborted at any time by
  400.           pressing <Esc> and responding to the "Are you sure...." prompt by
  401.           pressing <Return>.
  402.  
  403.           7) If HDTEST finishes testing without finding any bad clusters, it
  404.           will simply record that fact and the finishing time in the log file
  405.           and return to the DOS prompt. Otherwise, when read/write testing has
  406.           been completed (or terminated, by entering <Esc>), you will be
  407.           prompted for permission to complete the remapping process by updating
  408.           the disk FATs and Directories.  Pressing <Return> will allow this to
  409.           take place, and you will then be returned to the DOS prompt.
  410.  
  411.           8) N.B. If HDTEST reported and remapped any bad clusters and you are             ____                                                  ___        
  412.           using the DOS (3.3 and above) FASTOPEN utility, or any other
  413.           directory- or file-cacheing software, you should reboot your system
  414.           before proceeding with other work on it.
  415.  
  416.           9) In any event, if HDTEST reported and remapped some bad clusters,
  417.           you should read the section on "Dealing with bad clusters" later in
  418.           this documentation.
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.           
  447.           
  448.                                           Page 6 
  449.            
  450.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  451.           
  452.           
  453.                              HARDWARE & SOFTWARE REQUIREMENTS                             ________________________________
  454.  
  455.           HDTEST and HDCHEK make a number of assumptions about the environment
  456.           in which they are operating. They will, generally speaking, abort with
  457.           an informative error message if they find one of these assumptions to
  458.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  459.           about 320 Kb of free memory (the exact amount required depends on the
  460.           size and other characteristics of the device being tested) to run -
  461.           the presence of more memory may (slightly) increase HDTEST's speed
  462.           when testing devices with large cluster sizes. The device to be tested
  463.           must be usable as a normal DOS device - commands such as DIR, COPY,
  464.           and CHKDSK should be valid for it and for files and subdirectories on
  465.           it. It need not, however, be bootable. Only the DOS partition(s) of a
  466.           multi-operating-system disk can be tested, but all the partitions of a
  467.           disk that is divided into multiple DOS partitions can be tested (one                                             ___                              
  468.           by one). This version of HDTEST fully supports DOS 3.3 (and above)
  469.           extended partitions, and will test them as thoroughly as it does
  470.           normal DOS partitions. HDTEST's support for other disk partitioning
  471.           software is provided only to the extent that DOS support is provided
  472.           by the producers of that software.
  473.  
  474.           If you wish to use HDTEST to test a new hard disk which is to be                                       ____                               
  475.           configured to support multiple operating systems, you should first
  476.           configure it as one or more DOS partitions, test it in that
  477.           configuration, and then reconfigure it as you intend to use it. If you                                  __                                            
  478.           have low-level disk formatting software which allows you to specify
  479.           bad sectors and/or tracks to be "locked out", you can use HDTEST's /G
  480.           option on the DOS partition(s) to  produce a list of defects, which
  481.           can then be used in reformatting the disk. Note that HDTEST can only                                                                          ____
  482.           be used as a test for areas of the disk that are to be devoted to                       ____                                                
  483.           other operating systems - when you repartition the disk, any remapping
  484.           and/or marking of bad clusters which HDTEST may have done in the DOS
  485.           partition is lost.
  486.  
  487.           Ideally, for normal hard disks, the BIOS handler for interrupt 13
  488.           should be capable of handling (at least) normal disk reads and writes
  489.           (sub-functions 2 and 3) in a way that is compatible with that
  490.           documented for the XT hard disk adapter (and AT BIOS) in IBM's
  491.           technical documentation. This should be no problem for most disk
  492.           systems on IBM PCs and most compatibles.  HDTEST may, however, be
  493.           forced to use the (somewhat more limiting) DOS device interface when
  494.           used with non-bootable hard disks and/or with hard disks which require
  495.           special device drivers to be installed, and will be forced to use the
  496.           DOS device interface when dealing with disks partitioned by means
  497.           other that the DOS 3.3 (and above) utilities.
  498.  
  499.           Earlier V4.xx releases of HDCHEK and HDTEST would abort if run on
  500.           small (<= 10 Mb) hard disks which had been patched to use a cluster
  501.           size smaller than the DOS standard (and 16-bit FATs). This deficiency
  502.           has been corrected in the current version, but very small (less than
  503.           1024 clusters) partitions may still cause problems if 16-bit FATs are
  504.           used (there is no good reason why such partitions should use 16-bit
  505.           FATs).
  506.  
  507.           If run under DOS 3.0 or above on an IBM INT 13 compatible hard disk,
  508.           The HD programs attempt to locate and use the ROM BIOS INT 13 entry
  509.           point, rather than the normal INT 13 vector (which DOS 3.x intercepts
  510.           
  511.           
  512.                                           Page 7 
  513.            
  514.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  515.           
  516.           
  517.           and interferes with). By default, for machines with 8088, 8086, 80188,
  518.           80186, or equivalent CPUs the programs assume that, if a ROM is                                                              ___________
  519.           present at absolute address C8000H, it contains the hard disk BIOS and          _______                                                            ___
  520.           has initialization code starting at offset 3. This assumption is true
  521.           for all hard disks which "plug in" to the IBM PC and XT. It may not be
  522.           true for all clones which come with hard disks installed, although it
  523.           is likely to be true for most of them. Also by default, the programs
  524.           assume that the hard disk BIOS in systems with 80286 or 80386
  525.           processors is in the "system" ROM at absolute address F0000H, but make
  526.           no more specific assumptions about its exact location. Problems (up to          __                                                                    
  527.           and including system halts) may occur if none of the special flags is
  528.           set and your system is configured in a way that is not consistent with
  529.           these assumptions. Such problems are almost guaranteed for PC or XT
  530.           systems if the initialization code does not start at offset 3 in the
  531.           ROM. If you know that your hard disk ROM is located somewhere other
  532.           than at the default segment address and/or does not obey the "rules",
  533.           you can use the /H flag to tell the programs where to look for it.
  534.           Unless you know that your system is particularly non-IBM-compatible,
  535.           however, it is usually worth trying to run the HD programs in their
  536.           default mode first. Problem hardware should respond to one of the
  537.           approaches described in the "Using the Special Preboot" section of
  538.           this documentation. The use of all the command line flags is discussed
  539.           in more detail below.
  540.  
  541.           Note that, since HDTEST remaps bad clusters to free space, there is
  542.           not much point in running it on a disk which has none (as shown by DIR
  543.           or CHKDSK), since the program will abort immediately if it finds a bad
  544.           cluster.  Unless you have a really flaky disk, however, you should not
  545.           need more than a couple of hundred Kb free to remap any reasonably
  546.           probable number of bad clusters.
  547.  
  548.           This version of the HD programs does not require an ANSI console
  549.           driver (such as ANSI.SYS) to be loaded. The programs will, however,
  550.           continue to function correctly if such a driver is present.
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.           
  575.           
  576.                                           Page 8 
  577.            
  578.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  579.           
  580.           
  581.                                LIMITATIONS AND RESTRICTIONS                               ____________________________
  582.  
  583.           The current version of HDTEST still has a few (mainly theoretical)
  584.           limitations, most of which result from the way data is stored
  585.           internally by the program. None of them are "etched in stone",
  586.           although some could only be avoided at the cost of slowing down what
  587.           is already (and necessarily) far from a fast program. The known
  588.           limitations are as follows:
  589.  
  590.           1) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  591.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  592.           less than that and may, since sector and cluster sizes tend to run in
  593.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  594.           enough for most people!.
  595.  
  596.           2) Because of certain limitations of the chips used to support direct
  597.           memory access (DMA, the method used to transfer data from disk to
  598.           memory and vice versa) in the IBM PC and most clones and compatibles,
  599.           HDTEST may be unable to use available memory efficiently when cluster
  600.           sizes (and the buffers needed to hold them) are large. This
  601.           inefficiency can result in "Insufficient Memory" or "Memory
  602.           Allocation" errors, even on systems with more than the minimum 320 Kb
  603.           of free memory prescribed above. The only cure for this is to free up
  604.           (or buy!) more memory (remove RAMdisks, remove resident software,
  605.           etc.).
  606.  
  607.           3) The current version of HDTEST will run, in its default mode, on ATs
  608.           and most AT clones, but may not be able to detect corrected ECC errors
  609.           when run in that mode on some of the clones - a warning message will
  610.           be displayed when the program initializes itself if corrected ECC
  611.           errors are not being detected. Appropriate use of the extended form of
  612.           the /H flag or the /U flag, as described in the "Using the Special
  613.           Preboot" section of this documentation, will allow detection of
  614.           corrected ECC errors on almost all hardware. The program will not                                                                        ___
  615.           detect corrected ECC errors when invoked with the /I flag (under DOS
  616.           3.0 or above) or with the /D flag.
  617.  
  618.           4) For reasons which are poorly understood (at least by the author!),
  619.           HDTEST runs very slowly on Epson Equity II systems, particularly when                      ____                                                     
  620.           used to test "plug-in" hard drives of the "Hardcard" or "Flashcard"
  621.           variety. For this hardware, the estimated run times given elsewhere in
  622.           the documentation need to be multiplied by about 2.5. There is some                                       __________          ___               
  623.           reason to think that this problem may be related to an excessively
  624.           "optimistic" interleave setting on (at least) some of these systems.
  625.  
  626.           5) HDTEST or HDCHEK will, by default, abort with an informative error
  627.           message if the program detects that the (80286 or better) CPU that it
  628.           is running on is not in "real" mode, since this normally means that a
  629.           (possibly multitasking) OS other than MS/PC-DOS is running and that
  630.           HDTEST cannot be guaranteed unchallenged access to the hardware. The
  631.           presence of LIM 4.0 expanded memory emulators such as QEMM-386 or
  632.           386^Max, which use the 80386's "virtual 8086" mode to allow remapping
  633.           of extended memory into unoccupied space in the area between 640 Kb
  634.           and 1 Mb, will cause a similar abort, unless the driver is inactive
  635.           (turned "OFF"). This safety feature can be bypassed by the use of the
  636.           /V command line option (see below).
  637.  
  638.           
  639.           
  640.                                           Page 9 
  641.            
  642.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  643.           
  644.           
  645.           6) HDCHEK and HDTEST will operate normally (except than the /U or /H
  646.           flags will generally be needed to use the low-level interface) on
  647.           (very large) hard disks with more than 1024 cylinders, provided that
  648.           the partition being tested does not begin or end above cylinder 1023.                                                    ______                     
  649.           If the partition starts below and ends above this point, HDCHEK will
  650.           issue a warning and HDTEST will abort unless the /D flag is used. If
  651.           the partition starts above cylinder 1023, both HDCHEK and HDTEST will
  652.           abort without the /D flag.
  653.  
  654.  
  655.                                    COMMAND LINE OPTIONS                                   ____________________
  656.  
  657.           Always run HDCHEK on any new hardware/software configuration before          ______                                                             
  658.           you attempt to run HDTEST (at least the first time). The latter
  659.           program has been written as conservatively as possible, but it is not
  660.           possible to predict the behavior of every conceivable combination of
  661.           hardware and operating system when dealing with a program which
  662.           bypasses most of the controls which normally protect the user from
  663.           destroying his world. HDCHEK is invoked with the command line:
  664.  
  665.           HDCHEK device [/A] [/Cn | /CQ] [/D | /I | /U] [/Hnnnn[:nnnn] [/M] [/V]
  666.  
  667.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  668.           are permitted but not required). For versions of HDCHEK from V4.35,                            ___                                              
  669.           the spaces between the device identifier and the flags (and between
  670.           different flags) are optional - the command lines "HDCHEK C:/C2/D" and
  671.           "HDCHEK C: /C2 /D" are equivalent.
  672.  
  673.           The /A(T) flag is used to tell the HD program that it is being run on
  674.           an IBM AT. Setting the /A flag allows the programs to deal correctly
  675.           with a known bug in the IBM AT floppy disk controller BIOS when HDTEST
  676.           is used on 1.2 Mb "AT format" 5.25" floppy disks. If the /A flag is
  677.           set and the CPU is not an 80286 or better, you will be asked to
  678.           confirm that you wish to use AT defaults (HD BIOS at F0000H).
  679.  
  680.           N.B. the definition of the /A flag changed (slightly) at V4.71 - it          ___________________________________________________________________
  681.           need now only be used if you are testing a 1.2 Mb floppy disk on a          __________________________________________________________________
  682.           "vanilla" IBM AT. It may still be used to change the default BIOS          _________________________________________________________________
  683.           segment to F0000H on a PC or XT class machine, but the use of the /H          ____________________________________________________________________
  684.           flag for this purpose is preferred.          ___________________________________
  685.  
  686.           The /C flag has two variants. It is used, immediately followed by a
  687.           single decimal digit ("n") in systems which do not support IBM's INT
  688.           11 "equipment determination" BIOS function (e.g. the Tandy 2000). The
  689.           parameter ("n") is the number of floppy drives attached to the system,
  690.           which would otherwise be determined by the program, using INT 11. The
  691.           second variant should be used on Compaq computers - here, the flag is
  692.           followed by a "Q", instead of a number. This variant enables large
  693.           device support (as for IBM DOS 4.00) under Compaq DOS 3.31.
  694.  
  695.           The /D(OS interrupts) flag forces HDCHEK to use the hardware-
  696.           independent DOS interrupt 25 for access to the target device. It is
  697.           usually not required, since the program is usually smart enough to          _______                                    _______                
  698.           recognize devices which have to be accessed this way (e.g. logical
  699.           disk partitions other than those created as DOS 3.3 (and above)
  700.           "Extended Devices", non-bootable hard disks, some removable-media hard
  701.           disks). If the /D flag is not used, the program will issue a warning                                    ___                                       
  702.           
  703.           
  704.                                          Page 10 
  705.            
  706.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  707.           
  708.           
  709.           message if it finds it has to use the DOS interrupts.
  710.  
  711.           N.B. the definition of the /D flag changed at V4.00 - the new /I flag          _____________________________________________________________________
  712.           has the same effect as the old (pre-V4.00) /D flag. Only one of these          _____________________________________________________________________
  713.           flags may be present on the command line.          _________________________________________
  714.  
  715.           The /I(nterrupt 13) flag has no effect under DOS 2.x.  Under DOS 3.0
  716.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  717.           always does under DOS 2.x), and prevents the program from trying to
  718.           determine the ROM BIOS entry point; the flag should be used if you
  719.           know that your system's fixed disk BIOS uses INT 13 but does not
  720.           follow IBM's "rules" or if the program crashes the system when invoked
  721.           without it.
  722.  
  723.           The /H(ex BIOS address) flag is normally used (with a single numeric
  724.           argument) to tell the HD programs that the ROM BIOS of the device
  725.           being tested is located at nnnn, which is interpreted as a Hexadecimal
  726.           segment address, rather than at C800, which is the default for PC and
  727.           XT class machines, or F000, which is the default for systems using a
  728.           80286 or better CPU. There must be no space between the H and the
  729.           number. The extended form of the /H flag (e.g. /HF000:80D5) forces the
  730.           HD programs to use the given address as the ROM BIOS INT 13 entry                                               ____________________________
  731.           point. Its use is documented in more detail in the "Using the Special          _____                                                                
  732.           Preboot" section of this documentation.
  733.  
  734.           The /M(ulti-track read problem) flag forces HDCHEK to split up disk
  735.           accesses that would otherwise require the BIOS to read data from more
  736.           than one track in a single "bite". Its use is documented in more
  737.           detail in the "Using the Special Preboot" section of this
  738.           documentation.
  739.  
  740.           The /U(se INT 68) flag forces the HD programs to use the existing INT
  741.           68 vector (which must have been set up to point to an appropriate
  742.           location!) instead of locating and using the INT 13 BIOS entry point.
  743.           The use of this flag is documented in more detail in the "Using the
  744.           Special Preboot" section of this documentation.
  745.  
  746.           The /V(irtual mode) flag bypasses the code which prevents the HD
  747.           programs from working when the (80286 or better) CPU is not in "real
  748.           mode". It should only be used when the programs are being run under a                           ____                                                
  749.           single-tasking operating system which is using "virtual mode" only for                                                                        ____    
  750.           memory-mapping. Certain LIM 4.0 expanded memory emulators for 386
  751.           machines use the processor's virtual mode for this purpose. The two
  752.           most well-known examples of this software are QEMM-386 and 386^Max.
  753.           The HD programs are "DESQview aware", and will abort if run under
  754.           DESQview, even if the /V flag is used. They will not be able to
  755.           protect you from the (probably disastrous) consequences of using the
  756.           /V flag to run them under other multi-tasking OSes (such as VM-386).
  757.  
  758.           After a short delay, during most of which the specified device will be
  759.           active, a description of the device's logical structure will be disp-
  760.           layed.  After a further delay, and more disk activity, a message will
  761.           be printed giving the number of files and subdirectories found on the
  762.           disk, and the program will exit back to DOS. Note that the total
  763.           number of files and subdirectories reported by HDCHEK will be greater
  764.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  765.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  766.           
  767.           
  768.                                          Page 11 
  769.            
  770.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  771.           
  772.           
  773.           Errors and/or problems encountered, if any, will be reported on in
  774.           some detail. A number of example screen displays and log files
  775.           produced by running HDCHEK (and HDTEST) on different systems will be
  776.           found in Appendix C at the end of this documentation. If HDCHEK tells
  777.           you that you have a bad 8088 chip, believe it - some early 8088s had a
  778.           bug which allowed them to be interrupted while changing their stack
  779.           frame*  - this is not benign, and can cause all sorts of rare,
  780.           otherwise almost inexplicable, problems. The only cure is to replace
  781.           the CPU (which is, fortunately, not a particularly expensive
  782.           proposition these days). If HDCHEK reports a discrepancy between the
  783.           two FATs, HDTEST will abort. The FIXFAT program (on the distribution
  784.           disk) may be able to correct this problem - see FIXFAT.DOC, also on
  785.           the distribution disk. 
  786.  
  787.           Always run the DOS CHKDSK program immediately before running HDTEST on
  788.           a disk. If CHKDSK reports any problems, its /F option (or other means)
  789.           should be used to correct them before HDTEST is run.                                         ____________________ 
  790.  
  791.  
  792.           HDTEST is invoked with the command line:
  793.  
  794.                HDTEST device1 [device2[:pathname]] [optional parameters]
  795.  
  796.           "optional parameters" may include one or more of the following:
  797.  
  798.           [/A] [/B] [/Cn | /CQ] [/D | /I | /U] [/F] [/G[V]] [/Hnnnn[:nnnn]] [/M]
  799.           [/N] [/P] [/R[n]] [/Snnnnn] [/U] [/V] [/X] [/Yn] [/Z[n]]
  800.  
  801.           "device1" is the name of the device to be tested, as for HDCHEK.
  802.           "device2" (which, if present, must be different from "device1") is the                                        ____                                    
  803.           name of a device on which a log file is to be written, which may be
  804.           immediately followed by  a file- or path-name for the log file. If
  805.           only a device name (with or without a colon) is specified for the log
  806.           file, a file called HDTESTdn.LOG will be written to the default
  807.           directory on the specified device. "d" in this file specification is
  808.           replaced by the single-character specifier of the device being tested,
  809.           while "n" is replaced by the lowest decimal digit which results in the
  810.           creation of a new file (previous log files will not be overwritten).                        ___                               ___                 
  811.           If all ten possible log file names for this test device have already
  812.           been used, the program will prompt for a new name. If a directory path
  813.           (ending in a backslash (\)) is specified as device2, HDTESTdn.LOG will
  814.           be created in the specified directory. If a full pathname is specified
  815.           (not ending in a backslash), a file with that pathname will be opened           ___                                                                 
  816.           as the log file. In this case (only), any pre-existing file of the
  817.           same name will be overwritten. If "device2" is not specified, errors
  818.           are reported to the console terminal. The DOS console redirection
  819.           facility should not be used to redirect them elsewhere.                          ___                                    
  820.  
  821.  
  822.  
  823.           _____________________________________________________________________
  824.  
  825.           * See "Chips in Transition", by Bob Smith. PC Tech J. 4:4 (Apr. 1986):                                                     __________                 
  826.           56-69. The code which the HD programs use to identify the CPU and
  827.           diagnose this problem is adapted from the CPUID program described in
  828.           this article and from code from subsequent, related, articles in that
  829.           (now defunct) magazine.
  830.           
  831.           
  832.                                          Page 12 
  833.            
  834.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  835.           
  836.           
  837.           For versions of HDTEST from V4.35, the spaces between the device
  838.           identifier and the flags (and between different flags) are optional -
  839.           the command lines "HDTEST C:/A/F" and "HDTEST C: /A /F" are
  840.           equivalent.
  841.  
  842.           The /A, /C, /D, /H, /I, /M, /U, and /V flags have the same meaning and
  843.           effect that they do for HDCHEK. When used for HDTEST, the /D flag
  844.           forces the use of INT 25 to read from and INT 26 to write to the
  845.           target disk.
  846.  
  847.           The /B(oot/Partition sector test) flag forces the program to include
  848.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  849.           for the purposes of read/write testing. The default action is only to
  850.           perform read and seek tests on this sector, even if read/write testing
  851.           of the DOS area is specified. Since the boot/partition sector is
  852.           effectively read-only under normal circumstances (it is only written                                                                       _______
  853.           to during low-level formatting, and by FDISK and other disk          __                                                         
  854.           partitioning programs), read/write testing is less vital than for the
  855.           rest of the disk. In addition, at least one hard disk controller (a
  856.           Western Digital board which allows a single disk to be addressed as
  857.           two "physical" devices) will not allow test patterns to be written to
  858.           this sector. Certain devices (chiefly RAMdisks) appear to DOS to be
  859.           hard disks but do not, in fact, possess boot/partition sectors. On
  860.           these devices, HDTEST will report check/test results on the
  861.           boot/partition sector while actually reading/writing the device's boot
  862.           sector - the latter sector will simply end up being checked/tested
  863.           twice under these circumstances.
  864.  
  865.           The /F(ast mode) flag causes the program to use only two test patterns
  866.           (all 1s and all 0s) for read/write testing. It is intended for use on
  867.           floppy disks and for "quick and dirty" testing of other devices.
  868.  
  869.           The /G(ive error details) flag causes the program to determine the
  870.           location of errors occurring during testing of the disk's data area at
  871.           the sector level (they are normally handled at the cluster level), and
  872.           to report on the location of all bad sectors found. The report is
  873.           written to the log device or file after all testing is finished. By                                            _____________________________    
  874.           default, only an error code is given for each bad sector - if a V (for
  875.           "verbose"!) is appended to the flag, the error code is expanded to a
  876.           report similar to that given for each bad cluster. This flag is
  877.           ineffective (and ignored) if HDTEST is using DOS interrupts, either
  878.           because the /D flag was set or because the program was not able to
  879.           access the disk at the BIOS level.
  880.  
  881.           The /N(o Query) flag disables the individual prompts for confirmation
  882.           which the program normally issues before remapping clusters which are
  883.           marked as "Reserved" or which are part of a file which is marked as
  884.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the                                                               ___            
  885.           program from prompting for confirmation before updating the disk.
  886.  
  887.           The /P(rint) flag causes the log file to be directed to the PRN device
  888.           (normally LPT1), and overrides any "device2" specification.
  889.  
  890.           The /R(epeat)n flag causes HDTEST to go through n complete testing
  891.           cycles. Omitting n, or setting it to zero, causes HDTEST to run
  892.           continuously until terminated by pressing <Esc>). Instead of stopping
  893.           after completing the testing of allocated data clusters, the program
  894.           
  895.           
  896.                                          Page 13 
  897.            
  898.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  899.           
  900.           
  901.           immediately starts again with the DOS area. Any bad clusters found and
  902.           flagged in the first pass should be reported as "already marked as
  903.           bad" in subsequent passes. The /R flag implicitly sets the /N flag.
  904.  
  905.           The /S(tart)nnnnn flag causes HDTEST to start testing occupied                                                                ________
  906.           clusters at cluster number nnnnn (expressed as a decimal number).                                                           _______         
  907.           There must be no space between the "S" and the number. This option
  908.           will mainly be useful when a previous run of HDTEST was interrupted
  909.           (by pressing <Esc>), since it allows you to start where you left off.
  910.           Note that, in order to be sure that data is not remapped to a bad
  911.           area, HDTEST always tests all empty clusters before starting to test                       ______       ___                                       
  912.           occupied clusters. For this reason, using the /S flag will not result
  913.           in a large time saving if your disk is nearly empty, and it will make
  914.           the most difference on a full, or nearly full, disk.
  915.  
  916.           The /Y(es, please remap)n flag causes HDTEST to remap up to n (a
  917.           decimal number) bad clusters without prompting for confirmation. It is
  918.           effective only if HDTEST is allowed to run to completion, and is
  919.           intended to allow the program to be run unattended on multiple disks
  920.           from a .BAT file. If more than n bad clusters are found or if the
  921.           program is aborted (by pressing <Esc>), the normal prompt for
  922.           confirmation is issued before any bad clusters are remapped. See
  923.           "Running HDTEST from a .BAT file".
  924.  
  925.           The /X(clude bad clusters) flag causes HDTEST not to test clusters                                                        ___                 
  926.           that are already marked as bad by FORMAT or previous runs of HDTEST
  927.           (the default is to test all clusters every time the program is run).                                  ___                                         
  928.           This saves some time when testing a disk with a substantial number of
  929.           known defects. The marked clusters will be reported as bad but will
  930.           not be retested. The /X flag overrides the /G flag for previously
  931.           marked clusters - no bad sector report will appear for these clusters
  932.           if both flags are used.
  933.  
  934.           The /Z(ero bad sectors)n flag controls how HDTEST deals with sectors
  935.           that could not be read correctly (due to unrecoverable read errors)
  936.           when it remaps bad clusters. Versions of HDTEST up to and including
  937.           V4.10 (somewhat cavalierly) disregarded the remaining contents of the
  938.           entire cluster if one or more sectors in it were unreadable, and
  939.           remapped it to a cluster of NULLs. The default action is now to
  940.           replace only the unreadable sector(s) with NULLs, transferring the                                      _________                             
  941.           remaining sectors intact to the remapped cluster. There are, however,
  942.           two other options, which can be chosen by setting n to 0 or 2 (if n is
  943.           omitted, 1, or any other number, the default action is taken). Setting
  944.           n to 0 uses the old default (remaps the bad cluster to a cluster of                          ___                                      _______   
  945.           NULLs), while setting n to 2 goes to the other extreme and copies all
  946.           data read (some of which is almost certainly invalid) to the remapped
  947.           cluster. It is always safe and often advisable to use the /Z2 option
  948.           provided that you do not try to use any non-ASCII files that have been          ______________________________________________________________________
  949.           remapped with unrecovered read errors and this (/Z) option. Remapped          ___________________________________________________________         
  950.           ASCII files can be inspected with an editor and fixed up where
  951.           necessary - non-ASCII files (e.g. .EXE, .COM, .WKS files) may appear
  952.           to be undamaged (the program may run, the worksheet be readable, etc.)
  953.           but they can still contain small changes which will cause trouble
  954.           later, and they cannot easily be checked. The large "holes" which /Z
  955.           options 0 and 1 leave in such files usually allows it to be much more
  956.           obvious that they are defective!
  957.  
  958.           
  959.           
  960.                                          Page 14 
  961.            
  962.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  963.           
  964.           
  965.                                    WHAT DOES HDTEST DO?                                   ____________________
  966.  
  967.           After displaying its copyright message, HDTEST reads the FATs and
  968.           scans the root directory and all subdirectory trees of the specified
  969.           device before initiating a short dialogue. All questions are of the
  970.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  971.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  972.           alone is equivalent to giving the default response (which appears in
  973.           square brackets at the end of each prompt).  HDTEST then proceeds to
  974.           test the specified device. By default, the DOS area (boot sector,
  975.           FATs, and root directory) is not subjected to Read/Write testing,
  976.           since failures in this area usually make themselves apparent fairly
  977.           rapidly. The user can, however, choose to run these tests on the DOS
  978.           area too, or to limit testing to read and seek tests only over the
  979.           whole partition.
  980.  
  981.           In its reports to the screen, HDTEST uses the convention that read-
  982.           only testing is "Checking" while read/write testing is "Testing" - it
  983.           always "checks" the boot/partition sector and the rest of the DOS
  984.           area, but only "tests" them if requested to do so.
  985.  
  986.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  987.           reads it (retrying, if necessary, up to five times) and then does the
  988.           longest possible seek away from it before attempting to read it again.
  989.           "Checking" is complete at this point. "Testing" continues with the
  990.           program sequentially writing 20 (or 2, for "fast mode") different bit
  991.           patterns to the block and checking that each one can be read
  992.           correctly, before rewriting the original contents of the block (and
  993.           reading it again to ensure that it has been restored correctly).
  994.           Errors that occur at any point in this process are reported and (if
  995.           the block is in the data area - errors in the DOS area are always
  996.           treated as fatal) the block is remapped. If an error is detected in a
  997.           "Reserved" cluster or in one that is part of a file which is marked as
  998.           "System", "Hidden", or "Readonly", the user is normally asked for
  999.           confirmation before the cluster is remapped, otherwise it is assumed
  1000.           that remapping is desired.
  1001.  
  1002.           HDTEST keeps a copy of the FAT and a map of the device's directory
  1003.           structure in memory. A bad cluster is remapped by transferring its
  1004.           contents to a free cluster and (if the bad cluster was in use)
  1005.           changing all necessary FAT and directory entries in memory so that the
  1006.           pointer chain which maintains the structure of the affected file or
  1007.           subdirectory remains valid. The bad cluster's FAT entry is then
  1008.           altered to identify it as bad to DOS. The device's FATs and                                                    ________         
  1009.           directories are not altered until the whole device has been scanned,
  1010.           and then only after the user has confirmed that it is OK to proceed.
  1011.           This means that a power failure and/or an inadvertent power-off which
  1012.           occurs while the program is running will cause the loss of, at most,
  1013.           one cluster of data and of no FAT or root directory information
  1014.           (unless you are very unlucky and it happens after you have confirmed                          ____                                                
  1015.           that you want a damaged data area to be remapped and while this is
  1016.           being done). If a power failure and/or power-off occurs while a
  1017.           cluster which contains the directory information of a subdirectory is
  1018.           being tested, part or all of that subdirectory will probably become
  1019.           inaccessible to DOS, although the data in it will remain on the disk
  1020.           and be potentially recoverable with the aid of (e.g.) the Norton
  1021.           Utilities (TM).
  1022.           
  1023.           
  1024.                                          Page 15 
  1025.            
  1026.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1027.           
  1028.           
  1029.           You can safely interrupt the testing process part way through (by
  1030.           pressing the <Esc> key) with no risk of leaving a partially updated
  1031.           FAT or directory. If you do interrupt the program in this way, you
  1032.           will be given the option of updating the disk, so that bad clusters
  1033.           which were detected before <Esc> was pressed can be remapped.
  1034.  
  1035.           Errors which occur in the program's initialization phase cause it to
  1036.           abort with an error message and (sometimes) a hexadecimal error code.
  1037.           The meaning of the error code is context-dependent and it is useful
  1038.           only to technical support personnel (i.e. the author!). Errors
  1039.           detected during read-write testing only cause the program to abort if
  1040.           they occur during testing of the DOS area, or if remapping is
  1041.           impossible (only likely to happen if the disk is full). In any event,
  1042.           a description of the error is written to the log file (if any) and/or
  1043.           to the screen. This specifies the cluster or (for the DOS area) sector
  1044.           number and the name of the affected file (if any), and defines the
  1045.           type(s) of error which occurred. Appendix B contains a discussion of
  1046.           some of the more technical aspects of data storage on disks (floppy
  1047.           and hard), and includes more information about some of the possible
  1048.           errors that may be encountered.
  1049.  
  1050.           HDTEST takes a very long time to run to completion because of the                         ____                                              
  1051.           large number of reads and writes it does for each cluster. A typical
  1052.           time for full testing ("slow" mode) of an XT disk (10 Mb) would be 2
  1053.           hrs; full disk testing on a 30 Mb Enhanced AT takes at least 4 hrs.
  1054.           Note also that using the /D or /G flags will substantially slow down
  1055.           the testing of disks with significant numbers of bad spots. Using the
  1056.           /X flag as well will allow the physical location of new defects to be
  1057.           reported without requiring that known bad areas be exhaustively
  1058.           retested.
  1059.  
  1060.  
  1061.                                 USING THE SPECIAL PRE-BOOT                                __________________________
  1062.  
  1063.           All IBM systems (at least non-PS/2 ones - I have little experience,
  1064.           yet, with the new line of IBM hardware) - and almost all clones
  1065.           capable of running IBM PC-DOS (rather than "generic" MS-DOS) should
  1066.           also run the HD programs with no problems, and should allow them to
  1067.           locate and use the ROM BIOS INT 13 entry point with no help from the
  1068.           user. Less compatible systems have presented more problems in the
  1069.           past, but this version of HDTEST is distributed with a supplemental
  1070.           program (BOOTLOAD) which can be used to modify the boot sector on a
  1071.           floppy disk and create a special pre-boot floppy to allow
  1072.           identification and use of the "real" INT 13 entry point on almost any
  1073.           MS-DOS-compatible system. Once created by BOOTLOAD, the special boot
  1074.           sector will be correctly duplicated if copy the disk by using the DOS                 ____                                                          
  1075.           "DISKCOPY" command - it will not be copied by a "COPY *.*" command.                                       ___                                   
  1076.           Further documentation for the BOOTLOAD program (BOOTLOAD.DOC) should
  1077.           have been included in this package.
  1078.  
  1079.           After using BOOTLOAD to create the special pre-boot disk, insert it in
  1080.           the boot drive (normally drive A), then (re)boot your system as you
  1081.           normally do (either by switching it on or by pressing the <Ctrl>-
  1082.           <Alt>-<Del> combination or its equivalent for your hardware). After
  1083.           performing its self-test, the system's BIOS will load and pass control
  1084.           to the code on the boot sector of the floppy. On a normally FORMATTed
  1085.           floppy disk, this code attempts to locate the MS-DOS system files at
  1086.           
  1087.           
  1088.                                          Page 16 
  1089.            
  1090.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1091.           
  1092.           
  1093.           the beginning of the disk's root directory and to load and execute
  1094.           them. The HDTEST boot disk will not load DOS (even if you SYS the
  1095.           disk) - it simply reads and reports on the contents of the INT 13
  1096.           vector (which DOS has not yet had a chance to tamper with, since it
  1097.           has not been loaded) and conditionally transfers the vector to the INT
  1098.           68 location. The INT 68 location is normally unused in MS-DOS systems
  1099.           - it is defined that way by IBM - and is usually loaded either with
  1100.           zeroes or with a pointer to some "do-nothing" code by the BIOS
  1101.           bootstrap. The HD programs use it for the "real" INT 13 vector,
  1102.           normally saving the original contents of the location on entry and
  1103.           restoring them on exit. This behavior is modified by specifying the /U
  1104.           switch on the command line. The HDTEST boot sector code will only
  1105.           transfer the "real" INT 13 BIOS entry point to the INT 68 location if
  1106.           the latter contains either zeroes or the same vector as INT 69. In the                              ______        __                                  
  1107.           latter case (since there is no point in having two "real" interrupt
  1108.           vectors pointing at the same place), it is assumed that both are
  1109.           pointing at "do-nothing" code. If the INT 68 vector is neither 0:0 nor                                                                 _______     ___
  1110.           the same as the INT 69 vector, the preboot code will leave it alone
  1111.           and report that the INT 13 vector was not transferred, otherwise it
  1112.           will confirm that the transfer has taken place - in any event, you
  1113.           will be given an opportunity to write down the vector and can then
  1114.           remove the disk and press a key to allow the boot process to complete.
  1115.           If you need to boot from a floppy disk, for some reason, a new,
  1116.           bootable, disk can be inserted before you press the key to continue.
  1117.  
  1118.           If the preboot reported that the INT 13 vector was successfully
  1119.           transferred, you should simply specify the /U flag on the HDTEST or
  1120.           HDCHEK command line, in addition to the "short" form of the /H flag                               ______________                                
  1121.           (if the BIOS ROM is at an unusual location for the class of machine).
  1122.           The requirement for the /H flag with unusual hardware allows the
  1123.           program to do some additional "reasonableness checking". Unless some
  1124.           other software interferes with it, the INT 68 vector will then
  1125.           continue to be set up correctly for use by the HD programs until the
  1126.           system is switched off or rebooted.
  1127.  
  1128.           If the preboot was not able to transfer the vector, or if you know
  1129.           that a device driver or resident program loaded by your DOS uses INT
  1130.           68, you should invoke the HD programs with the "long" form of the /H
  1131.           flag, specifying the full address displayed by the preboot. No error
  1132.           checking is attempted in this case - if you mistype the address, the
  1133.           first time the program attempts to access the disk, it will jump to a
  1134.           (effectively) random location in ROM, with potentially disastrous
  1135.           results. If it is feasible, use of the pre-boot disk and the /U flag
  1136.           is preferable (in terms of safety, if for no other reason) to that of
  1137.           the "long" form of /H.
  1138.  
  1139.           The following example may help to clarify matters. You have a clone
  1140.           system with a BIOS ROM location that is non-standard. The HDTEST boot
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.           
  1151.           
  1152.                                          Page 17 
  1153.            
  1154.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1155.           
  1156.           
  1157.           disk reports that the INT 13 entry point is at E000:13AC, and that the
  1158.           vector has been successfully transferred. You may now run HDTEST with
  1159.           the command line:
  1160.  
  1161.           HDTEST C: A: /U /HE000                            ____
  1162.  
  1163.           You may also, now or later, with or without prior use of the pre-boot,                                      _______________                           
  1164.           run HDTEST with the command line:
  1165.  
  1166.           HDTEST C: A: /HE000:13AC                         _________
  1167.  
  1168.           Note that the /H flag is not needed with the /U flag if the segment                                   ___                                       
  1169.           address of the hard disk BIOS is the usual value for the system type                                                           ___________________
  1170.           (as determined by the processor). For a system based on an 8088, 8086,
  1171.           80188, or 80186 processor, this "usual" value is C800. For all other
  1172.           systems, the "usual" value is F000.
  1173.  
  1174.           One further problem may be encountered - certain hard disk BIOSes do
  1175.           not exactly comply with IBM standards in dealing with disk accesses
  1176.           that cross track boundaries, and will produce frequent errors when
  1177.           such accesses are attempted. It was this "multi-track read" problem
  1178.           which resulted in a number of previously apparently 99.99% IBM-
  1179.           compatible systems failing to run IBM PC-DOS 3.3 (which was the first
  1180.           version of DOS actually to attempt such accesses). IBM issued a "fix"
  1181.           for this problem, in the form of a program which, when run on the
  1182.           "bad" system, creates a device driver which protects the BIOS from
  1183.           being asked to do something that it can't. This device driver does its
  1184.           job by intercepting INT 13, and will, of course, do nothing to help
  1185.           the HD programs if they are bypassing that interrupt. Use the /M flag
  1186.           with the HD programs if you have a system on which PC-DOS 3.3 or above
  1187.           will not run without being "fixed" as described. It forces the
  1188.           programs to split up the multi-track accesses into manageable chunks -
  1189.           this can be expected to cause a substantial slowing of the programs'
  1190.           operation.
  1191.  
  1192.  
  1193.                                  DEALING WITH BAD CLUSTERS                                 _________________________
  1194.  
  1195.           It is not unusual for a new hard disk to have a small, constant,                                                          _____  ________ 
  1196.           number of bad clusters. IBM's quality control standards allow, for
  1197.           example, 5% of the surface area of a disk to be bad (!). These pre-
  1198.           existing bad clusters, which correspond to imperfections in the
  1199.           magnetic coating on the disk, will normally be detected and marked by
  1200.           the DOS FORMAT program, and HDTEST will report them as "already marked
  1201.           as bad". This should not be regarded as evidence of any real problem
  1202.           with the disk, although some suppliers (not including IBM) will                                                  ___                    
  1203.           replace such disks under warranty if pressed to do so. It is also not
  1204.           unusual for a disk to develop a few more defects as it ages. When                                          ___                              
  1205.           these do develop, they are also subsequently constant in size and
  1206.           position, and will be reported as "already marked as bad" by HDTEST on
  1207.           runs subsequent to that during which they are first found. The
  1208.           occasional appearance (and subsequent persistence) of a new bad          __________                                                     
  1209.           cluster is, therefore, not necessarily evidence of serious trouble
  1210.           developing.  However, if more than one or two new bad clusters are
  1211.           reported by HDTEST, and especially if two consecutive runs (or passes,
  1212.           if the /R flag is set) of HDTEST report different bad clusters, there                                                  _________                    
  1213.           is a good chance that the hard disk or controller is developing a
  1214.           
  1215.           
  1216.                                          Page 18 
  1217.            
  1218.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1219.           
  1220.           
  1221.           serious problem - the disk should be backed up immediately and the
  1222.           disk and/or controller sent for repair at the earliest opportunity.
  1223.  
  1224.           New bad clusters in the data area are automatically mapped out by
  1225.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  1226.           area can be handled in two ways:
  1227.  
  1228.           1) If you are able to do a low-level format on your hard disk (most                                     _________                               
  1229.           makers of "add-on" hard disks supply a method of doing this, either in
  1230.           the form of a short program, or by giving instructions for running a
  1231.           program in the ROM BIOS from DEBUG), back up the entire hard disk                                                           ______          
  1232.           (including any non-DOS partitions), run the low-level format, use
  1233.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  1234.           HDTEST now reports no errors in the DOS area you can restore all your
  1235.           files and continue to use the disk. You should, however, use HDTEST to
  1236.           test (at least) the DOS area fairly frequently for a month or so to be
  1237.           sure that the problems are not going to recur.
  1238.  
  1239.           2) If you do not have the means to do a low-level format, or if you
  1240.           follow the above instructions and HDTEST continues to report errors in
  1241.           the DOS area, your only other choice is to back up the DOS partition,
  1242.           reconfigure the disk with FDISK so that the new DOS partition starts
  1243.           above the bad area, reFORMAT it, and restore all of the old files to
  1244.           the new DOS partition (which will unavoidably be a little smaller than
  1245.           the old).
  1246.  
  1247.           If the hard disk's boot/partition sector (track 0, Head 0, sector 1)
  1248.           becomes bad, the disk is useless and must be replaced. This sector is
  1249.           only subjected to read/write testing if the /B flag is specified on                            __________                                       
  1250.           the command line, so any reported errors (in sector -1) during normal                                                              __               
  1251.           testing represent a problem reading the sector and are likely to be                                      _______                                
  1252.           significant. Problems encountered during read/write testing of this
  1253.           sector do not always indicate a significant problem - certain                    ___                                                
  1254.           controller cards may not allow test patterns to be written to it,
  1255.           resulting in a report of multiple errors on read/write testing.
  1256.           Consequently, if multiple errors are reported on read/write testing of
  1257.           the boot/partition sector, but read-only testing proceeds without
  1258.           problems and the rest of the disk seems to be OK, there is probably no
  1259.           cause for concern.
  1260.  
  1261.  
  1262.                               RUNNING HDTEST FROM A .BAT FILE                              _______________________________
  1263.  
  1264.           Versions of HDTEST from V4.75 can be run from a .BAT file (e.g. for
  1265.           unattended testing of multiple disks) without the user losing the
  1266.           ability to "escape" cleanly from the program. The /Y flag also allows
  1267.           the user to specify a maximum number of new bad clusters for each disk
  1268.           to be remapped "automatically", so that the .BAT file will normally
  1269.           just keep going but will pause and wait for input if something
  1270.           terrible seems to have happened to a disk. In order to run HDTEST from
  1271.           a .BAT file, it is necessary to prepare both the .BAT file with your                                                  ____                        
  1272.           usual HDTEST command lines, generally including the /Y and /N flags,
  1273.           and a second ASCII file containing the answers to HDTEST's initial          ___                                                               
  1274.           questions, one per line. DOS's input redirection ("<") command is used
  1275.  
  1276.  
  1277.  
  1278.           
  1279.           
  1280.                                          Page 19 
  1281.            
  1282.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1283.           
  1284.           
  1285.           to "feed" these answers to HDTEST. If the "answer" file is called
  1286.           (e.g.) ANSWERS.TXT, each line in the .BAT file will look like:
  1287.  
  1288.               HDTEST dev1 dev2 /opt1 /opt2 <ANSWERS.TXT                                           ____________
  1289.  
  1290.           If you do not wish to read/write test the DOS area of the disk, your
  1291.           answer file can consist of three blank lines. If you do wish to                                                               __        
  1292.           read/write test the DOS area, the first line of the answer file can be
  1293.           blank, the next two must start with a "y" and the fourth can be blank.                          ___                                                   
  1294.           In order to allow HDTEST to be interrupted from the keyboard, if
  1295.           necessary, the program terminates input redirection before starting
  1296.           testing the disk, so anything in the answer file after the answers to                                                           _____               
  1297.           HDTEST's initial questions will be ignored.
  1298.  
  1299.           On exit, HDTEST now returns a meaningful ERRORLEVEL, which can be
  1300.           tested from a .BAT file by means of DOS's "IF ERRORLEVEL" syntax.
  1301.           Versions of the program prior to V4.81 returned an ERRORLEVEL of 1 on
  1302.           aborts and 0 otherwise - HDCHEK still does this. The current version
  1303.           of HDTEST normally returns an ERRORLEVEL equal to the number of new
  1304.           bad clusters found. On aborts it returns 254, and, if deliberately
  1305.           terminated by the user (either by answering "N" to the last question
  1306.           in the introductory dialogue or by pressing and confirming <Esc>
  1307.           during testing), it returns 255.
  1308.  
  1309.           Note that this application of HDTEST is really intended for advanced
  1310.           users, and I am aware that this description is somewhat cursory - more
  1311.           help in using it can, if necessary, be obtained directly from me.
  1312.  
  1313.  
  1314.                             BUGS AND OTHER UNPLEASANT SUBJECTS                            __________________________________
  1315.  
  1316.           Although, like all programmers, I like to think that my product is
  1317.           perfect, it is possible that there are a few bugs lurking in the
  1318.           depths of the program, and likely that some combination of software
  1319.           and hardware exists which HDTEST cannot figure out and/or cope with.
  1320.           If you think you have found a bug and/or if you cannot get either of
  1321.           the programs to work on your system, do the following:
  1322.  
  1323.           1) Reread this documentation! Make sure that you are doing exactly
  1324.           what the documentation says to do. Make sure (if you are testing a
  1325.           drive with removable media) that the media is not write-protected.
  1326.  
  1327.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  1328.           your DOS distribution disk - and try to run the HD programs again. If
  1329.           they run in this environment but not in your normal DOS environment,
  1330.           try reconstructing the system under which they failed by adding things
  1331.           one by one until the problem recurs. If you find a specific piece of
  1332.           software which causes the trouble, let me know about the
  1333.           incompatibility.
  1334.  
  1335.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  1336.           bombs (the reverse should never happen), send me as detailed a
  1337.           description of the problem as possible and I will do my best to
  1338.           diagnose and fix it. A bug report should always include a full                                                   ______               
  1339.           description of the system being used (hardware and software), as well                                                         ___                   
  1340.           as a copy of the output from a run of HDCHEK.
  1341.  
  1342.           
  1343.           
  1344.                                          Page 20 
  1345.            
  1346.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1347.           
  1348.           
  1349.           I can be contacted by U.S. mail at the address given earlier in the
  1350.           documentation, by BIXMail to pfletcher, or by Compuserve EMail to
  1351.           72255,305.
  1352.  
  1353.  
  1354.                               CHANGES FROM PREVIOUS VERSIONS                              ______________________________
  1355.  
  1356.           The first version of the HD programs actually released (not including
  1357.           beta-test versions) was V2.60. The programs have grown and developed
  1358.           gradually, for the most part, but the pre-V4.65 releases listed below
  1359.           have constituted the most significant "watersheds" - features added
  1360.           and changes made between the listed releases are treated here as if                           _______                                           
  1361.           first included in the next listed release, so some individuals for                                ____                                        
  1362.           whom this is an upgrade may have packages with some, but not all, of
  1363.           the features listed for a given release. Note that the previous V4.45
  1364.           Shareware version of the program is not listed here - it was identical
  1365.           to V4.41 except that it included the "fix" for the deficiency which
  1366.           was corrected at V4.70 in the Registered version. Unless otherwise
  1367.           noted, both programs were affected by the listed changes.
  1368.  
  1369.  
  1370.           Version 4.95 (this version)          ____________               
  1371.  
  1372.           1) Added code to prevent undetected "wrap-around" when using existing
  1373.           INT 13 on a disk with more than 1024 cylinders.
  1374.  
  1375.  
  1376.           Version 4.94          ____________
  1377.  
  1378.           1) Copyright screen displayed for minimum of 2 seconds (may be longer
  1379.           if program is being run on a large device).
  1380.  
  1381.  
  1382.           Version 4.93          ____________
  1383.  
  1384.           1) Deficiency allowing "queueing" of keystrokes in typeahead buffer
  1385.           fixed. <Esc> now produces (almost) immediate response even if other
  1386.           key(s) have been pressed first.
  1387.  
  1388.  
  1389.           Version 4.92          ____________
  1390.  
  1391.           1) /V option added to bypass "virtual mode" prohibition.
  1392.  
  1393.  
  1394.           Version 4.91          ____________
  1395.  
  1396.           1) Problem with FAT comparison error report for > 64 Kb FATs
  1397.           introduced at V4.90 corrected (HDCHEK).
  1398.  
  1399.  
  1400.           (Version 4.90           ____________
  1401.  
  1402.           1) Previous restriction on testable FAT size (was 64 Kb) removed.
  1403.  
  1404.  
  1405.  
  1406.           
  1407.           
  1408.                                          Page 21 
  1409.            
  1410.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1411.           
  1412.           
  1413.           Version 4.84          ____________
  1414.  
  1415.           1) Minor change to reporting of initialization errors (HDCHEK).
  1416.  
  1417.  
  1418.           Version 4.83          ____________
  1419.  
  1420.           1) Remainder of fix for bug noted at V4.80!
  1421.  
  1422.  
  1423.           Version 4.81          ____________
  1424.  
  1425.           1) Meaningful ERRORLEVEL returned on exit (see "Running HDTEST from a
  1426.           .BAT file) (HDTEST).
  1427.  
  1428.  
  1429.           Version 4.80          ____________
  1430.  
  1431.           1) Bug causing the programs to fail if a subdirectory were physically
  1432.           located beyond the 32 Mb boundary on a large (> 32 Mb) device
  1433.           partially located and corrected.
  1434.  
  1435.  
  1436.           Version 4.75          ____________
  1437.  
  1438.           1) Log file specification capabilities enhanced (HDTEST).
  1439.  
  1440.           2) /Y flag and .BAT file support added (HDTEST).
  1441.  
  1442.  
  1443.           Version 4.71          ____________
  1444.  
  1445.           1) Fully automatic setting of default ROM BIOS location by CPU type.
  1446.           Meaning of and requirement for /A flag modified.
  1447.  
  1448.  
  1449.           Version 4.70          ____________
  1450.  
  1451.           1) Deficiency causing "fallback" to DOS interrupt level under some
  1452.           circumstances when attempting to test "extended devices" on a second
  1453.           physical hard drive fixed. The Shareware V4.45 also included this
  1454.           "fix".
  1455.  
  1456.  
  1457.           Version 4.66          ____________
  1458.  
  1459.           1) Support for large devices under Compaq DOS 3.31 added (see
  1460.           description of /C flag).
  1461.  
  1462.  
  1463.           Version 4.65          ____________
  1464.  
  1465.           1) DOS 4.0 support added (including BIOS-level access to large
  1466.           partitions), but see notes on V4.8x.
  1467.  
  1468.           2) Minor changes made to final screen & file output format (HDTEST).
  1469.  
  1470.           
  1471.           
  1472.                                          Page 22 
  1473.            
  1474.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1475.           
  1476.           
  1477.           3) Minor improvements made to memory allocation algorithms.
  1478.  
  1479.           4) /G option added (HDTEST).
  1480.  
  1481.           5) /X option added (HDTEST).
  1482.  
  1483.  
  1484.           Version 4.54          ____________
  1485.  
  1486.           1) Deficiency in CPU recognition code (which caused fast AT clones
  1487.           sometimes not to appear to be ATs) fixed.                    ___                            
  1488.  
  1489.           2) ANSI.SYS requirement removed.
  1490.  
  1491.           3) Semi-automatic CPU recognition added.
  1492.  
  1493.           4) Pre-boot functionality, /M option, /U option, and extended
  1494.           (segment:offset) form of /H option added.
  1495.  
  1496.  
  1497.           Version 4.41          ____________
  1498.  
  1499.           1) Deficiency (introduced at V4.00) causing HDCHEK to issue an
  1500.           incorrect error report on an abort resulting from a FAT comparison
  1501.           error corrected.
  1502.  
  1503.           2) Minor deficiency, causing HDTEST to create an empty log file on the
  1504.           specified device when both a log device and the /P option were
  1505.           specified, corrected.
  1506.  
  1507.           3) Work-around for hardware multi-sector read ECC problem (see
  1508.           Appendix B) added (HDTEST).
  1509.  
  1510.           4) Support for small (<= 10 Mb) hard disks patched to have small
  1511.           clusters and 16-bit FATs added.
  1512.  
  1513.           5) Requirement that command line option flags be separated by one or
  1514.           more spaces or tabs removed.
  1515.  
  1516.           6) /R option added (to HDTEST) for multi-pass disk testing.
  1517.  
  1518.  
  1519.           Version 4.30          ____________
  1520.  
  1521.           1) Support for BIOS-level access to DOS 3.3 extended partitions added.
  1522.  
  1523.           2) /Z option added (to HDTEST) to control remapping of unreadable
  1524.           sectors in bad clusters.
  1525.  
  1526.  
  1527.           Version 4.10          ____________
  1528.  
  1529.           1) Assorted minor changes made to screen displays.
  1530.  
  1531.           2) /C option added to allow the programs to be used on some non-IBM
  1532.           compatible MS-DOS systems.
  1533.  
  1534.           
  1535.           
  1536.                                          Page 23 
  1537.            
  1538.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1539.           
  1540.           
  1541.           3) /D option redefined - old /D option became new /I option.
  1542.  
  1543.           4) /F option added (to HDTEST).
  1544.  
  1545.           5) "Short" form of /H option added.
  1546.  
  1547.  
  1548.           Version 3.13          ____________
  1549.  
  1550.           1) Assorted minor bugs and deficiencies in error reporting and
  1551.           termination routines fixed (HDTEST).
  1552.  
  1553.           2) Minor bug affecting reporting of multiple corrected ECC errors
  1554.           fixed (HDTEST).
  1555.  
  1556.           3) Disk reset added before retry on all errors (HDTEST).
  1557.  
  1558.           4) Absolute limit on number of files and directories on device
  1559.           removed.
  1560.  
  1561.           5) Display of total sector/cluster count during testing added
  1562.           (HDTEST).
  1563.  
  1564.           6) /A option added.
  1565.  
  1566.           7) /B option added (HDTEST).
  1567.  
  1568.  
  1569.           Version 2.73          ____________
  1570.  
  1571.           1) Bug (in V2.60) which could cause bad termination and possible
  1572.           subdirectory inconsistencies if a sector which was not in use was
  1573.           found to be bad, fixed (HDTEST).
  1574.  
  1575.           2) Bug (in V2.70) which caused HDTEST to enter a terminal input loop
  1576.           if ANSI.SYS was not loaded and <Esc> was entered to abort it, fixed.
  1577.  
  1578.           3) Minor bug in V2.60 (which resulted in a failed directory scan if
  1579.           the program was run on a write-protected device) fixed.
  1580.  
  1581.           4) Internal changes made to avoid interference with expanded memory
  1582.           device handlers.
  1583.  
  1584.           5) Ability to update disk after HDTEST terminated by user (typing
  1585.           <Esc>) added.
  1586.  
  1587.           6) /S option to start checking occupied clusters at a given cluster
  1588.           number added (HDTEST).
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.           
  1599.           
  1600.                                          Page 24 
  1601.            
  1602.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1603.           
  1604.           
  1605.                            APPENDIX A - SUMMARY OF FLAG SETTINGS                           _____________________________________
  1606.  
  1607.           /A(T) - used to tell the HD program that it is being run on an IBM AT
  1608.           (HDCHEK and HDTEST). /A is not equivalent to /HF000.
  1609.  
  1610.           /B(oot/Partition sector test) - used to include the hard disk
  1611.           boot/partition sector in the DOS area for the purposes of read/write
  1612.           testing (HDTEST only).
  1613.  
  1614.           /C(lone BIOS)n - used in systems which do not support the IBM BIOS's
  1615.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  1616.           The parameter ("n") is the number of floppy drives attached to the
  1617.           system, which is otherwise determined automatically (HDCHEK and
  1618.           HDTEST).
  1619.  
  1620.           /CQ (Compaq) - used to indicate that the program is running on a
  1621.           Compaq system. If DOS 3.31 (or above) is in use, large (> 32 Mb)
  1622.           devices are supported (HDCHEK and HDTEST).
  1623.  
  1624.           /D(OS interrupts) forces the program to use only DOS interrupts
  1625.           (INT 25 and INT 26) for access to the target device. May not be
  1626.           combined with the /I, /H, or /U flag (HDCHEK and HDTEST).
  1627.  
  1628.           /F(ast mode) limits read/write testing to the use of two patterns only
  1629.           (HDTEST only).
  1630.  
  1631.           /G(ive error details) allows the physical disk location of bad sectors
  1632.           to be identified (HDTEST only).
  1633.  
  1634.           /H(ex BIOS address)nnnn[:nnnn] - used to tell the HD programs that the
  1635.           ROM BIOS of the device being tested is located at nnnn, which is
  1636.           interpreted as a Hexadecimal segment address, rather than at the (CPU-
  1637.           dependent) default. The extended (segment:offset) form of the command
  1638.           is used to force the programs to use the given address as the INT 13
  1639.           entry point (HDCHEK and HDTEST).
  1640.  
  1641.           /I(nterrupt 13) - forces the program to use the existing INT 13
  1642.           vector.  This is the default under DOS 2.x. May not be combined with
  1643.           the /D, /H, or /U flag (HDCHEK and HDTEST).
  1644.  
  1645.           /M(ulti-track read problem) - bypasses the multi-track read problem
  1646.           which also prevents certain otherwise IBM-compatible clones from
  1647.           running PC-DOS 3.3 (HDCHEK and HDTEST).
  1648.  
  1649.           /N(o Query) - disables the individual prompts for confirmation which
  1650.           the program normally issues before remapping "special" clusters - does
  1651.           not prevent the program from prompting for confirmation before          ___                                                           
  1652.           updating the disk (HDTEST only).
  1653.  
  1654.           /P(rint) - causes the log file to be directed to the PRN device
  1655.           (HDTEST only).
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.           
  1663.           
  1664.                                          Page 25 
  1665.            
  1666.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1667.           
  1668.           
  1669.           /R(epeat)n - causes HDTEST to perform n complete testing cycles (or to
  1670.           continue until interrupted for n=0) (HDTEST only).
  1671.  
  1672.           /S(tart from)nnnnn - causes HDTEST to start testing occupied clusters                                                              ________         
  1673.           at cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  1674.  
  1675.           /U(se existing INT 68 vector) - causes the HD programs to use the
  1676.           existing INT 68 vector as the INT 13 entry point (HDCHEK and HDTEST).                   ______                                                      
  1677.  
  1678.           /V(irtual mode) - bypasses normal prohibition on running program if
  1679.           80286 or better CPU is operating in "virtual mode". Allows use with
  1680.           QEMM-386 and 386^Max.
  1681.  
  1682.           /X(clude marked bad sectors) - causes HDTEST to report on but not
  1683.           retest clusters that are already marked as bad (HDTEST only).
  1684.  
  1685.           /Y(es, please remap)n - allows HDTEST to update the disk by remapping
  1686.           up to n new bad sectors without prompting for confirmation (HDTEST                                  _______                                   
  1687.           only).
  1688.  
  1689.           /Z(ap bad sectors)n - controls remapping of unreadable sectors in bad
  1690.           clusters (HDTEST only) - n may have one of the following values:
  1691.               0 - Remap clusters with any unreadable sectors to all NULLs
  1692.               1 (default) - Remap only actual unreadable sectors to NULLs
  1693.               2 - Transfer all data read to the new cluster
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.           
  1727.           
  1728.                                          Page 26 
  1729.            
  1730.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1731.           
  1732.           
  1733.                              APPENDIX B - DISK ERROR MESSAGES                             ________________________________
  1734.  
  1735.           Users of earlier versions of this software repeatedly requested that I
  1736.           provide a more detailed explanation of the significance of some of the
  1737.           error messages displayed by HDTEST when it encounters a bad sector or
  1738.           cluster on the disk. It is not possible to do this without assuming
  1739.           (or imparting) a more detailed understanding of the "nitty-gritty"
  1740.           details of data storage on hard and floppy disks than most people want
  1741.           or need, let alone possess. This Appendix is not, therefore, "required
  1742.           reading" for the safe or effective use of the HD programs. It is
  1743.           intended as a tutorial for those who would like to understand some-
  1744.           thing more of what is really going on on their hard or floppy disk                                ______                                      
  1745.           drive when the little red light comes on.
  1746.  
  1747.           For the purposes of what follows, it is (fortunately) not necessary to
  1748.           know or understand exactly how changes in magnetic flux on the surface
  1749.           of a hard (or floppy) disk are translated into binary data, or vice
  1750.           versa. That could be the subject of another long dissertation. I will
  1751.           simply take for granted that binary data, conceptually organized into
  1752.           8-bit bytes, can be read and written by the disk drive hardware under
  1753.           the command of its controller (which usually resides on a separate
  1754.           card plugged into one of the computer's expansion slots). I will be
  1755.           describing how blocks of data are physically arranged on a disk and
  1756.           how the disk controller goes about ensuring that the data it reads has
  1757.           not been corrupted since it was written.
  1758.  
  1759.           I propose to start off by referring to some of the error-detection and
  1760.           error-correction techniques and procedures that are applied to data
  1761.           stored on magnetic media. These techniques and procedures are
  1762.           necessary because, although magnetic media are very reliable and the
  1763.           technology of recording and playback is well understood, there always
  1764.           remains the possibility that a defect in the medium or some other
  1765.           intercurrent problem may cause the sequence of bytes read back from a
  1766.           disk or tape to be something other than a perfect duplicate of the
  1767.           sequence that was stored. If a single copy of the raw data were all
  1768.           that were recorded, there would be no way of immediately detecting
  1769.           (let alone correcting) such an error. It might be brought to light
  1770.           when the file that was changed caused problems when it is used by or
  1771.           executed as a program, but it might not become apparent until it had
  1772.           propagated itself through and caused problems or errors in multiple
  1773.           other programs or files. This would clearly be an unacceptable state
  1774.           of affairs. In order to prevent this from occurring, then, there
  1775.           should be some means of checking data which is read in from storage
  1776.           for errors, and/or (preferably) of correcting any errors which may
  1777.           have occurred before any use is made of the data.                        ______                             
  1778.  
  1779.           Although error checking and/or correction can (and sometimes does)
  1780.           take place at any level from that of the application program down to
  1781.           that of the device controller, I am only going to describe the means
  1782.           that are used by hard and floppy disk controllers. When a block of
  1783.           data is passed to the controller to be written to the disk, a series
  1784.           of arithmetical operations is performed in sequence on all the bytes
  1785.           in the block, to produce a 2-byte (for diskettes) or multi-byte (for
  1786.           hard drives) code. The diskette controller implements what is known as
  1787.           a cyclic redundancy check (CRC) algorithm, which is optimized to allow
  1788.           detection of all single bit errors and many longer error bursts (it is          _________                                                             
  1789.           reasonable to assume that errors will most probably either affect a
  1790.           
  1791.           
  1792.                                          Page 27 
  1793.            
  1794.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1795.           
  1796.           
  1797.           single bit at random or, if they result from media defects, a number
  1798.           of adjacent bits). The longer (at least 32-bit) error correcting code
  1799.           (ECC) calculated by a hard disk controller gives enough information to
  1800.           allow detection and correction of, at least, all single bit errors and                          ______________                                        
  1801.           detection of most likely longer error bursts. The CRC or ECC is saved
  1802.           on disk with the data and is read back in by the controller when the
  1803.           data is read. The controller then compares the saved CRC or ECC with
  1804.           one newly calculated from the data. If the two are identical, the data
  1805.           is assumed to be valid and a successful read is signalled. If there is
  1806.           a discrepancy, a diskette controller always returns the data with a
  1807.           "CRC error", since the CRC code does not contain enough information to
  1808.           allow the incorrect bit or bits to be identified. On a hard disk, if
  1809.           the ECC comparison suggests a correctable error, it will be corrected,
  1810.           and the read call will return with a "Corrected ECC Error" code but
  1811.           with (presumably) valid data in the transfer buffer. If a more
  1812.           extensive error is detected, on the other hand, the call returns with
  1813.           a "Uncorrectable ECC Error" code (which is the same as the CRC error
  1814.           code).
  1815.  
  1816.           The 32-bit ECC used by IBM and many compatible disk manufacturers
  1817.           allows correction of single-bit errors only. Manufacturers of other,                                                 ____                         
  1818.           usually more expensive, controllers use longer and more complex ECCs,
  1819.           to allow the correction of some multi-bit errors, but the necessity to
  1820.           minimize the time taken to calculate the ECC (which is part of "access
  1821.           time") sets tight limits on how complex it can be. ECC error
  1822.           correction is unfortunately not infallible. It is possible for a                                      ___                                 
  1823.           complex, uncorrectable error to result in the same ECC disparity as a                   __                                                          
  1824.           different, correctable, error, so that invalid "corrected" data can be                                                                          ______
  1825.           returned. The longer and more complex the ECC, the less likely this
  1826.           becomes, but there is no way of completely avoiding this ambiguity,
  1827.           short of keeping multiple copies of the data on the disk. In addition,
  1828.           some hard disk controllers* apparently abort with the "corrected ECC
  1829.           error" code immediately on encountering a sector containing such an                      ___________                                            
  1830.           error, even if it is not the last sector in the block specified by a                               ___                                            
  1831.           (multi-sector) read request. This non-intuitive (to say the least of
  1832.           it) behavior can combine with DOS 3.x's habit of ignoring corrected                                                           ________          
  1833.           ECC errors to result in apparently inexplicable disk-related problems,
  1834.           up to and including system crashes (if the file in which the problem
  1835.           occurred contained executable code). This hardware deficiency may be
  1836.           related to the problems which have plagued users of DOS 3.3 on some
  1837.           (previously) apparently IBM-compatible non-IBM hardware, since these
  1838.           also result from (similar but distinct) deficiencies in the clones'
  1839.           handling of multi-sector disk reads. Prior to V4.36, HDTEST did retry                                                                      ___      
  1840.           corrected ECC errors which were reported on the first read of a
  1841.           cluster, but would eventually (if the corrected error persisted)
  1842.           accept the data read as valid and copy and remap it to a "good"
  1843.           cluster. This could cause trouble if the controller had the "immediate
  1844.           abort on corrected ECC error" problem described above and the ECC                                                                ___        
  1845.           error were not in the last sector of the cluster, since the sectors
  1846.           after the "bad" one would not have been read, and would be lost
  1847.           (actually replaced by the corresponding sectors from the previous                                                                   ________
  1848.           cluster read) after remapping. On a machine with this problem, DOS
  1849.  
  1850.           _____________________________________________________________________
  1851.  
  1852.           * This behavior is known to occur with some early Western Digital
  1853.           controllers (1002A-WX1, 1002S-WX2) but it may occur with others, too.
  1854.           
  1855.           
  1856.                                          Page 28 
  1857.            
  1858.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1859.           
  1860.           
  1861.           would not, of course, have done any better than the earlier versions
  1862.           of HDTEST at reading the bad cluster, and HDTEST at least warned you
  1863.           that there was a problem, but the behavior described was certainly not
  1864.           ideal. From V4.36, HDTEST rereads clusters in which a persistent
  1865.           corrected ECC error is reported on the initial read sector by sector,                                                              ________________ 
  1866.           to ensure that all the data in the cluster is transferred when it is                         ___                                                  
  1867.           remapped. In most cases (as long as the ECC error was really                                                                ______
  1868.           correctable), this will save the cluster (and the file of which it is
  1869.           a part) intact.
  1870.  
  1871.           DOS allows the programmer and/or computer user to think of and deal
  1872.           with disk data in terms of files, lines, and/or records, but data is
  1873.           always moved between a disk and memory a sector at a time. Any disk
  1874.           read or write request passed to DOS eventually gets translated into a
  1875.           command to read or write one or more sectors on the disk, commencing
  1876.           at a specified head, track, and sector. A floppy disk may have either
  1877.           one or two usable surfaces, corresponding to the top and bottom of the                            ________                                            
  1878.           disk. A hard disk usually has at least two surfaces, and may have
  1879.           more, since multiple physical "platters" are frequently incorporated
  1880.           in a single device. Each surface is normally accessed by and
  1881.           corresponds to a single read/write head, which moves radially across                                             ____                             
  1882.           it, although one surface on newer disks is often reserved for "servo"
  1883.           tracks, which are written with a special pattern that allows the
  1884.           controller to ensure that the read/write heads are kept exactly
  1885.           aligned with the data tracks. For a single device, the (data) heads
  1886.           are, by convention, numbered sequentially from zero up to one less
  1887.           than the total number present. Each surface is further divided into a
  1888.           number of circumferential tracks (or cylinders) and each track is                                    ______     _________                   
  1889.           divided into a number of sectors. Again by convention, the tracks on                                   _______                                    
  1890.           each surface are also numbered sequentially from zero, with track zero
  1891.           being the outermost track. The sectors on each track are normally
  1892.           numbered from one to a number corresponding to the total number of                        ___                                                 
  1893.           sectors on the track, but adjacent sectors do not normally have                                                        ___              
  1894.           consecutive sector numbers. A typical arrangement of the seventeen
  1895.           sectors on a single track of an XT hard disk, for example, would be as
  1896.           follows: 1,8,15,5,12,2,9,16,6,13,3,10,17,7,14,4,11. This "inter-                                                                    ______
  1897.           leaving" of sectors helps to make multi-sector disk reads and writes          _______                                                             
  1898.           more efficient. The controller requires a finite time to process the
  1899.           data from one sector before it can start reading (or writing) the
  1900.           next. During this time, of course, the disk continues to rotate and
  1901.           one or more of the sectors which physically "follow" the one that was
  1902.           last accessed pass under the read/write head unread. Ideally, the
  1903.           interleave (number of physical sectors separating consecutively
  1904.           numbered sectors) should be such that the next sector is just about to
  1905.           come under the read-write head when the controller is free to deal
  1906.           with it, but, because this time is not exactly predictable, it is
  1907.           better to be too conservative (as IBM usually is) and make it one or
  1908.           two sectors longer than necessary than to be too optimistic. Too small
  1909.           an interleave value is very undesirable, because it results in the
  1910.           controller having to wait almost a complete disk rotation time for
  1911.           each sector it misses to come round again.
  1912.  
  1913.           At the beginning of each disk sector is an address mark, a short,                                                     ____________          
  1914.           recognizable (to the controller) bit sequence containing the track and
  1915.           sector number. The process of writing the address marks for each
  1916.           sector on a disk is known as "low-level" or "sector" formatting. The
  1917.           DOS FORMAT program does this when it is run on floppy disks, but on
  1918.           
  1919.           
  1920.                                          Page 29 
  1921.            
  1922.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1923.           
  1924.           
  1925.           hard disks the DOS program merely makes sure that all required address
  1926.           marks are present - they are created by the disk manufacturer or
  1927.           supplier's low-level format program, which may or may not be available
  1928.           to the end user. After each address mark there follows a short gap (to
  1929.           allow the controller time to recognize and respond to the address
  1930.           mark), then the raw data, then the CRC or ECC data. A sector normally
  1931.           contains 512 bytes of raw data, but DOS (and HDTEST) can recognize and
  1932.           deal appropriately with devices with non-standard sector sizes.
  1933.  
  1934.           When a sector read/write command is passed to the disk controller, it
  1935.           (the controller) causes the disk's read/write head to move (seek) to                                                                      ____    
  1936.           the specified track, waits a few milliseconds for it to settle down,
  1937.           and then starts to "pay attention to" the data passing underneath it.
  1938.           The controller locates and reads the address marks to confirm that the
  1939.           read/write head is positioned at the correct track and to identify
  1940.           each sector. If data is being read from the disk, the raw data and
  1941.           recorded CRC or ECC from the requested sector(s) are transferred into
  1942.           the disk controller's internal buffers and (assuming that no errors
  1943.           are detected), thence to main memory. If data is being written, the
  1944.           controller derives the error-checking data from the raw data and
  1945.           writes both to the disk. Some of this process is under the direct
  1946.           control of the controller hardware, but it is supervised by the
  1947.           device's ROM BIOS, which is responsible for error-reporting. Errors
  1948.           can occur at almost any stage of the read/write process, but (if the
  1949.           disk is working at all) usually result from media defects or problems
  1950.           developing in the mechanical components of the hard disk drive. Media
  1951.           defects, once present, are generally constant in size and position
  1952.           (although jarring a disk while it is being written to may sometimes
  1953.           generate a temporary bad sector).                     _________             
  1954.  
  1955.           When HDTEST detects an error during read/write testing of a sector or
  1956.           cluster which has not previously been marked as bad, a (normally)
  1957.           four-line error message is printed, either to the screen (by default),
  1958.           to the printer (/P option), or to the logging file (if an output
  1959.           device was specified). The first line of the message simply indicates
  1960.           the sector or cluster number at which the error occurred. The second
  1961.           line indicates what sort of error was detected and during what phase
  1962.           of read/write testing it occurred. The third line indicates whether
  1963.           HDTEST was able to recover and/or remap the data from the bad sector
  1964.           or cluster, and the fourth indicates either the file which a bad
  1965.           cluster formed part of or that the cluster was not in use. If it was
  1966.           not possible to read one or more sectors from a cluster which
  1967.           contained data (unrecoverable read error), a further two-line message
  1968.           is printed which notes how many sectors were unreadable and how the                                          _______                            
  1969.           data from the bad cluster has been remapped (which depends on whether
  1970.           a /Zn option was specified on the command line). If the /M flag is not
  1971.           specified when HDTEST is run on a system that suffers from the "multi-
  1972.           track read" problems discussed in the main part of the documentation,
  1973.           multiple bad clusters may be reported with no errors persisting on                                                     __                     
  1974.           sector-by sector reading. These reports should disappear if the /M
  1975.           flag is used.
  1976.  
  1977.           If the "verbose" form of the /G option is used, the bad sector report
  1978.           will contain the equivalent of the second and third lines of the bad
  1979.           cluster report for each bad sector. Note that, if the /X option is not                         ___________________                                    
  1980.           used to prevent testing of previously flagged bad clusters, these may
  1981.           give rise to spurious warnings of possible data loss in the third line
  1982.           
  1983.           
  1984.                                          Page 30 
  1985.            
  1986.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  1987.           
  1988.           
  1989.           of the bad sector report. If no unrecoverable bad clusters were                                                            ________     
  1990.           reported, such warnings can safely be ignored. If the default form of
  1991.           the /G option is used, the bad sector report gives only a Hex error
  1992.           code for each bad sector. The LSB of this code is the value returned
  1993.           (in AH) by INT 13. The MSB of the code depends on the phase of testing
  1994.           during which the error occurred. In general, if the first digit (of a
  1995.           four digit code) is C or above, an unrecoverable error occurred, but
  1996.           error codes FFFD through FFFF have special meanings and indicate
  1997.           recovered errors.
  1998.  
  1999.           When the program detects an error during read/write testing of a
  2000.           sector in the DOS area, only the first three lines described above are
  2001.           printed and the program aborts. The remainder of this Appendix
  2002.           contains more details of and further information on the possible
  2003.           contents of lines two and three of HDTEST's disk error message.
  2004.  
  2005.           The second line of the disk read/write error message will usually take
  2006.           the form: "[Error Type] occurred during [phase of testing]". Possible
  2007.           values for [Error Type] are as follows (in alphabetical order):
  2008.  
  2009.           Address Mark Not Found - this is a fairly common error reported for
  2010.           bad blocks which are present from "scratch" on a new disk, since a
  2011.           significant media defect may well not retain sector formatting data
  2012.           and/or the manufacturer may have made sure that a known bad track on
  2013.           the disk will not be used by deliberately not writing address marks
  2014.           there. If new bad clusters are reported with this error message, it is
  2015.           likely that the hard disk surface has been physically damaged (perhaps
  2016.           by a shock to the drive) but possible that the controller has a
  2017.           problem.
  2018.  
  2019.           Bad Controller - this means what it says, but check that all boards
  2020.           and cables are properly seated before giving up.
  2021.  
  2022.           Bad Sector - the BIOS was instructed to read a sector number which
  2023.           should not (according to its configuration data) exist on the device.
  2024.           This indicates either an internal program error or that the program is
  2025.           having a problem determining the physical layout of the disk. Check
  2026.           the values reported by HDCHEK against those in the disk documentation.
  2027.  
  2028.           Bad Track - analogous to "Bad Sector".
  2029.  
  2030.           Buffer Comparison - the data read from a sector differs from that
  2031.           written to it. This should not happen, since it suggests either that
  2032.           the device's error-detection functionality has failed or that it has
  2033.           been overwhelmed. If it does occur, the most likely causes are
  2034.           controller and memory problems (in that order of likelihood).
  2035.  
  2036.           Corrected ECC - as discussed at some length above, the data retrieved
  2037.           from a hard disk was incorrect but the device's error-correction
  2038.           hardware was (probably) able to correct it.
  2039.  
  2040.           DMA Boundary Violation - should not occur (HDTEST positions its
  2041.           buffers to avoid crossing segment boundaries). Suggests either an
  2042.           internal program error or a controller/BIOS problem.
  2043.  
  2044.  
  2045.  
  2046.           
  2047.           
  2048.                                          Page 31 
  2049.            
  2050.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  2051.           
  2052.           
  2053.           Hardware Timeout - a seek or other operation was not completed within
  2054.           the maximum time allowed by the BIOS. Check connections, reseat
  2055.           boards, otherwise suspect the mechanics of the disk.
  2056.  
  2057.           Init Fail - should not occur (on a working disk).
  2058.  
  2059.           Internal - internal program error. Make sure that your working copy of
  2060.           HDTEST has not been corrupted. The disk is probably not defective.
  2061.  
  2062.           Invalid Command - should not occur. Treat as Internal Error.
  2063.  
  2064.           Multiple Errors - one or more additional errors occurred while HDTEST
  2065.           was attempting to recover from an initial one. Multiple phase report
  2066.           lines will be printed but the error types cannot be further specified.
  2067.  
  2068.           Recovered - HDTEST recovered from the error and did not report on the
  2069.           error type (should not occur).
  2070.  
  2071.           Reset Fail - The device could not be reset (after an error). Usually
  2072.           indicates major problems with the disk or controller, but check
  2073.           connections, etc.
  2074.  
  2075.           Sector Not Found - the requested sector's address mark was not found.
  2076.           Likely to result from a media defect.
  2077.  
  2078.           Seek Fail - after a seek to a track, the controller found that the
  2079.           read/write head was not positioned correctly. Usually indicates a
  2080.           significant problem with the (drive) hardware.
  2081.  
  2082.           Sense Fail - the controller cannot find the drive! Check connections,
  2083.           etc.
  2084.  
  2085.           Uncorrected ECC - data error too major to be corrected. Usually a
  2086.           media defect. This message will also be produced if a CRC error is
  2087.           detected on a floppy disk.
  2088.  
  2089.           Undefined - the BIOS cannot figure out what went wrong, but something
  2090.           did!
  2091.  
  2092.           Unknown - likewise!
  2093.  
  2094.           Write Protection - HDTEST is attempting to write to a write-protected
  2095.           device.
  2096.  
  2097.  
  2098.           Possible forms for the rest of the second line are as follows:
  2099.  
  2100.           ... Error (unrecovered) occurred during first read - the cluster could
  2101.           not be read without error in five tries before a seek to the other
  2102.           "end" of the disk.
  2103.  
  2104.           ... Error occurred during first read - the error occurred during the
  2105.           first read but was recovered after one or more retries.
  2106.  
  2107.           ... Error occurred during read after seek - the error occurred when
  2108.           the cluster was read after a seek away.
  2109.  
  2110.           
  2111.           
  2112.                                          Page 32 
  2113.            
  2114.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  2115.           
  2116.           
  2117.           ... Error occurred during pattern read/writes - the error occurred
  2118.           during the pattern read/write phase of testing.
  2119.  
  2120.           ... Error occurred during final write - the error occurred when the
  2121.           saved copy of the cluster was being restored to the disk.
  2122.  
  2123.           ... Error occurred during read after final write - the error occurred
  2124.           when the restored cluster was being read back.
  2125.  
  2126.           ... (Buffer comparison) error occurred after final read - the copy of
  2127.           the cluster read back after restoration to the disk differed from its
  2128.           original memory image.
  2129.  
  2130.  
  2131.           There are only three basic forms of the third line:
  2132.  
  2133.           This error is (or "These errors are") recoverable (no data loss has
  2134.           occurred). - the bad cluster was read successfully and has been
  2135.           successfully restored to its original form, but it remains suspect and
  2136.           will (with your permission) be remapped.
  2137.  
  2138.           This error is unrecoverable, but remapping is possible. - the bad
  2139.           cluster was read successfully but has not been restored to its                                                ___                     
  2140.           original form. Remapping should be successful, but the data will be
  2141.           lost if this is not permitted.
  2142.  
  2143.           This error is unrecoverable, and data may be lost! - the bad cluster
  2144.           was not read successfully and will be remapped as provided by the
  2145.           value of the /Z switch parameter if remapping is permitted. In any
  2146.           event, some data loss has almost certainly occurred.
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.           
  2175.           
  2176.                                          Page 33 
  2177.                 
  2178.                Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher               _______________________________        _______________________________
  2179.                
  2180.                
  2181.  
  2182.                    APPENDIX C - EXAMPLE PROGRAM RUNS                   _________________________________
  2183.  
  2184.      Screen display from successful run of HDCHEK on partition occupying the
  2185.      whole of a 20 Mb hard disk:
  2186.  
  2187. Device C: appears to be the DOS partition of a hard disk
  2188. It contains 41531 sectors
  2189. It starts at absolute sector 17 on the disk      {THIS IS CORRECT}                                                  _______________ 
  2190. The total partition size is approximately 20 Mb
  2191. There are 4 heads and 17 sectors/track
  2192. Sector size is 512 bytes
  2193. Each of the 2 (16 bit) FATs occupies 41 sectors
  2194. The Root Directory occupies 32 sectors
  2195. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2196. consisting of 4 sectors
  2197. The directory scan was successful; a total of 1260 files and subdirectories
  2198. was found.
  2199.  
  2200.  
  2201.  
  2202.      Screen display from successful run of HDCHEK on a freshly FORMATted DSDD
  2203.      9-sector floppy disk:
  2204.  
  2205. Device A: is not a hard disk - using DOS interrupts
  2206.  
  2207.  
  2208. Device A: is a floppy disk
  2209. The disk contains 720 sectors
  2210. There are 2 heads and 9 sectors/track
  2211. Sector size is 512 bytes
  2212. Each of the 2 (12 bit) FATs occupies 2 sectors
  2213. The Root Directory occupies 7 sectors
  2214. The data area starts at DOS sector 12, and contains 354 clusters, each
  2215. consisting of 2 sectors
  2216. The directory scan was successful; a total of 0 files and subdirectories
  2217. was found.
  2218.  
  2219.  
  2220.      Screen display from run of HDCHEK on 20 Mb DOS partition - directory
  2221.      structure bad or unrecognizable:
  2222.  
  2223. Device C: appears to be the DOS partition of a hard disk
  2224. It contains 41531 sectors
  2225. It starts at absolute sector 17 on the disk
  2226. The total partition size is approximately 20 Mb
  2227. There are 4 heads and 17 sectors/track
  2228. Sector size is 512 bytes
  2229. Each of the 2 (16 bit) FATs occupies 41 sectors
  2230. The Root Directory occupies 32 sectors
  2231. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2232. consisting of 4 sectors
  2233. The preliminary directory scan failed.
  2234.  
  2235.  
  2236.  
  2237.  
  2238.                
  2239.                
  2240.                                               Page 34 
  2241.                 
  2242.                Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher               _______________________________        _______________________________
  2243.                
  2244.                
  2245.      Screen display from run of HDCHEK on 20 Mb DOS partition - FATs not
  2246.      identical:
  2247.  
  2248. FATS are different
  2249. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  2250. Continue comparison (Y/N)? [Y]: n     {user input}                                _                 
  2251.  
  2252. Device C: appears to be the DOS partition of a hard disk
  2253. It contains 41531 sectors
  2254. It starts at absolute sector 17 on the disk
  2255. The total partition size is approximately 20 Mb
  2256. There are 4 heads and 17 sectors/track
  2257. Sector size is 512 bytes
  2258. Each of the 2 (16 bit) FATs occupies 41 sectors
  2259. The Root Directory occupies 32 sectors
  2260. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2261. consisting of 4 sectors
  2262.  
  2263.  
  2264.  
  2265.      Screen display from run of HDCHEK - program unable to deduce disk
  2266.      structure - disk not recognizable as a DOS device:
  2267.  
  2268. Unrecognized media descriptor byte! - see error code
  2269. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.                
  2303.                
  2304.                                               Page 35 
  2305.            
  2306.           Documentation for HDTEST V4.95          Copyright 1990, P. R. Fletcher          _______________________________        _______________________________
  2307.           
  2308.           
  2309.      Log file from successful run of HDTEST on 20 Mb DOS partition:
  2310.  
  2311.      HDTEST Log File - Wed Jan 07 11:44:52 1986
  2312.      Testing Device C:
  2313.  
  2314.      No new bad clusters identified - HDTEST finished.
  2315.      Wed Jan 07 16:10:41 1987
  2316.  
  2317.  
  2318.      Log file from run of HDTEST on 20 Mb DOS partition - one bad cluster
  2319.      detected and remapped:
  2320.  
  2321.      HDTEST Log File - Mon Jan 05 21:09:32 1987
  2322.      Testing Device C:
  2323.  
  2324.      Read/Write error at cluster number 7623!!
  2325.      Corrected ECC error occurred during pattern read/writes
  2326.      This error is recoverable (no data loss has occurred).
  2327.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  2328.  
  2329.      1 new bad clusters identified, marked, and remapped - HDTEST finished.
  2330.      Tue Jan 06 05:08:04 1987
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.           
  2367.           
  2368.                                          Page 36 
  2369.  
  2370.                         REGISTRATION FORM - HDTEST V4.95                        ________________________________
  2371.  
  2372.      Please complete this form and return it with a check or money order for
  2373.      $35.00 (+ $5.00 for shipping outside North America) or equivalent to:
  2374.  
  2375.                      Peter R. Fletcher
  2376.                      1515 West Montgomery Avenue
  2377.                      Rosemont
  2378.                      PA 19010
  2379.                      U.S.A.
  2380.  
  2381.      None of the information on this form will be passed on to any other
  2382.      individual or commercial organization.
  2383.  
  2384.      --------------------------------------------------------------------------
  2385.  
  2386.      This information is required to process your Registration:
  2387.  
  2388.      Last Name:____________________________  Other Names:______________________
  2389.  
  2390.      Address:______________________________  Town/City:________________________
  2391.  
  2392.      State:_____________  Post Code:____________  Telephone:_________________
  2393.                                                            (evenings/weekends)
  2394.  
  2395.      I understand that this software is supplied without warranty, express or
  2396.      implied, and agree not to hold its author liable for any direct or
  2397.      consequential loss arising out of my use of it.
  2398.  
  2399.      Signature:______________________________
  2400.  
  2401.      -------------------------------------------------------------------------
  2402.  
  2403.      You are requested, but not required, also to answer the following
  2404.      questions:
  2405.  
  2406.      On What type(s) of computer are you using HDTEST? _________________________
  2407.  
  2408.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  2409.  
  2410.      Type & Size of Hard Disk(s)? ____________________________________
  2411.  
  2412.      Make and Type of Hard Disk Controller(s)? ______________________________
  2413.  
  2414.      Do you own a Modem?                                             Y  N
  2415.  
  2416.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  2417.  
  2418.      How did you obtain/hear about this program?
  2419.  
  2420.      Did you think that the $35.00 registration fee for this program was:
  2421.  
  2422.      Very Good Value?              About Right?             Excessively High?
  2423.  
  2424.  
  2425.      Are there any other utility programs that you would like to see made
  2426.      available as "User Supported Software"? What sort of programs?
  2427.  
  2428.  
  2429.